From: Shawn Boyette Date: Wed, 6 Aug 2008 16:16:39 +0000 (+0000) Subject: added help X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=69cd1f8e29168f8ce11d9e9bb97984fe55f34018 added help --- diff --git a/fingerprinter b/fingerprinter index c5e5abb..0f3230d 100755 --- a/fingerprinter +++ b/fingerprinter @@ -190,6 +190,9 @@ for my $file (@ARGV) { print STDERR "Processed $count records\n"; } + + + =head2 initialyze Performs boring script initialization. Handles argument parsing, @@ -209,6 +212,7 @@ sub initialyze { 'runtype|r=s', 'tag|t=s', 'subfield|s=s', + 'help|h', ); show_help() unless $rc; my @keys = keys %{$c}; @@ -221,10 +225,13 @@ sub initialyze { print "Required option: ", join(', ', @missing), " missing!\n"; show_help(); } + show_help() if ($c->{help}); } =head2 show_help +Display usage message when things go wrong + =cut sub show_help {