From: Thomas Hochstein Date: Thu, 8 Apr 2010 04:21:05 +0000 (+0200) Subject: -h: Replace version/usage information with man page. X-Git-Tag: v0.7~13 X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=commitdiff_plain;h=ae3b1b7906bb835b80b86143c0285965afa728d8;hp=d69ba0bb348ffe87f0ead8497467b0aec5a10751 -h: Replace version/usage information with man page. Feed script to perldoc when called with -h. Signed-off-by: Thomas Hochstein --- diff --git a/yapfaq.pl b/yapfaq.pl index bce9684..888a4f5 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -61,7 +61,7 @@ my ($TDY, $TDM, $TDD) = Today(); #TD: Today's date my %Options; getopts('hvpdt:f:', \%Options); if ($Options{'h'}) { - print "$0 v $Version\nUsage: $0 [-hvpd] [-t ] [-f ]\n"; + exec ('perldoc', $0); exit(0); }; my ($Faq) = $Options{'f'} if ($Options{'f'}); @@ -697,7 +697,7 @@ was posted and the second being the message ID of that incarnation. =item B<-h> (help) -Print out version and usage information on B and exit. +Print this man page and exit. =item B<-v> (verbose)