Add option '-V': print version and copyright information.
authorThomas Hochstein <thh@inter.net>
Thu, 8 Apr 2010 05:36:11 +0000 (07:36 +0200)
committerThomas Hochstein <thh@inter.net>
Fri, 9 Apr 2010 23:05:55 +0000 (01:05 +0200)
Signed-off-by: Thomas Hochstein <thh@inter.net>
yapfaq.pl

index 888a4f5..084c77e 100644 (file)
--- a/yapfaq.pl
+++ b/yapfaq.pl
@@ -59,7 +59,12 @@ use Getopt::Std;
 my ($TDY, $TDM, $TDD) = Today(); #TD: Today's date
 
 my %Options;
-getopts('hvpdt:f:', \%Options);
+getopts('Vhvpdt:f:', \%Options);
+if ($Options{'V'}) {
+  print "$0 v $Version\nCopyright (c) 2003 Marc Brockschmidt <marc\@marcbrockschmidt.de>\nCopyright (c) 2010 Thomas Hochstein <thh\@inter.net>\n";
+  print "This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.\n";
+  exit(0);
+}
 if ($Options{'h'}) {
   exec ('perldoc', $0);
   exit(0);
@@ -695,6 +700,10 @@ was posted and the second being the message ID of that incarnation.
 
 =over 3
 
+=item B<-V> (version)
+
+Print out version and copyright information on B<yapfaq> and exit.
+
 =item B<-h> (help)
 
 Print this man page and exit.
This page took 0.012273 seconds and 4 git commands to generate.