]> diplodocus.org Git - minc/commitdiff
Drop -h and use Getopt::Std automatic --help. New $VERSION global.
authorepg <>
Sat, 3 Apr 2004 06:03:07 +0000 (06:03 +0000)
committerepg <>
Sat, 3 Apr 2004 06:03:07 +0000 (06:03 +0000)
minc

diff --git a/minc b/minc
index 790ecfeab2ab42a0f9dbd448bd416eded9ed2b9f..83acac454cbeeb1ea47e758de75eb07aa9889b43 100755 (executable)
--- a/minc
+++ b/minc
@@ -31,11 +31,13 @@ use Fcntl qw(O_WRONLY O_EXCL O_CREAT);
 use FileHandle;
 use File::Basename;
 use File::stat;
-use Getopt::Std;
+use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 1;
 use Log::Dispatch;
 use Log::Dispatch::File;
 use POSIX qw(strftime WEXITSTATUS WIFEXITED);
 
+our $VERSION = 1;
+
 # If a filter set's header is $MAGIC_TO_TOKEN, that set is compared
 # against headers matching this regex (taken from procmail).
 my $MAGIC_TO_REGEX = '^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To)';
@@ -54,7 +56,7 @@ my @SPAM;
 Dump (using Data::Dumper) the FILTERS list and exit.  This is useful
 for testing the syntax of .mincfilter.
 
-=item B<-h>
+=item B<--help>
 
 Show help.
 
@@ -78,19 +80,15 @@ our $run = 1;
 my $printfilenames = 0;
 
 our $opt_d;
-our $opt_h;
 our $opt_n;
 our $opt_p;
 
-if (not getopts('dhnp')) {
+if (not getopts('dnp')) {
     exit(2);
 }
 
 if ($opt_d) {
     $dumpfilters = 1;
-} elsif ($opt_h) {
-    print("Sorry bub, no help.\n");
-    exit;
 } elsif ($opt_n) {
     $run = 0;
 }