From 69cd1f8e29168f8ce11d9e9bb97984fe55f34018 Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Wed, 6 Aug 2008 16:16:39 +0000 Subject: [PATCH 1/1] added help --- fingerprinter | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) 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 { -- 1.7.2.5