fixed -m for systems without perldoc; fixed evil typo
authorMatthias Förste <foerste@schlittermann.de>
Tue, 24 May 2011 11:05:33 +0200
changeset 113 30bd047cd057
parent 112 5a51a3757f5e
child 114 d7dad17fbc1b
fixed -m for systems without perldoc; fixed evil typo
bin/dnssec-keytool
bin/update-serial
bin/zone-ls
bin/zone-mk
bin/zone-rm
--- a/bin/dnssec-keytool	Tue May 24 09:40:39 2011 +0200
+++ b/bin/dnssec-keytool	Tue May 24 11:05:33 2011 +0200
@@ -39,7 +39,10 @@
         "m|man"  => sub {
             pod2usage(
                 -exit      => 0,
-                -noperldoc => system("perldoc -V &>/dev/null"),
+                # "system('perldoc -V &>/dev/null')" appears shorter, but may not
+                # do what you expect ( it still returns 0 on debian squeeze with
+                # dash as system shell even if cannot find the command in $PATH)
+                -noperldoc => system('perldoc -V >/dev/null 2>&1'),
                 -verbose   => 2
             );
         },
--- a/bin/update-serial	Tue May 24 09:40:39 2011 +0200
+++ b/bin/update-serial	Tue May 24 11:05:33 2011 +0200
@@ -39,14 +39,17 @@
     GetOptions(
         "sign-alert-time=i" => \$opt{sign_alert_time},
         "key-counter-end=i" => \$opt{key_counter_end},
-        "h|help"            => sub { pod2usage(-exit 0, -verbose => 1) },
+        "h|help"            => sub { pod2usage(-exit => 0, -verbose => 1) },
         "m|man"             => sub {
             pod2usage(
-                -exit 0,
+                -exit => 0,
                 -verbose   => 2,
-                -noperldoc => system("perldoc -v &>/dev/null")
+                # "system('perldoc -V &>/dev/null')" appears shorter, but may not
+                # do what you expect ( it still returns 0 on debian squeeze with
+                # dash as system shell even if cannot find the command in $PATH)
+                -noperldoc => system('perldoc -V >/dev/null 2>&1')
             );
-        },
+        }
     ) or pod2usage;
 
     # merge the config and the defined options from commandline
@@ -511,6 +514,8 @@
 
 __END__
 
+=pod
+
 =head1 NAME
  
  update-serial - updates the serial numbers and re-signs the zone files
@@ -530,11 +535,12 @@
 
 =item B<--sign-alert-time> I<days>
 
+TODO
+
 =item B<--key-counter-end> I<integer>
 
 Maximum number if key usages.
 
-
 =back
 
 The common options B<-h>|B<--help>|B<-m>|B<--man> are supported.
--- a/bin/zone-ls	Tue May 24 09:40:39 2011 +0200
+++ b/bin/zone-ls	Tue May 24 11:05:33 2011 +0200
@@ -23,7 +23,10 @@
             pod2usage(
                 -exit      => 0,
                 -verbose   => 2,
-                -noperldoc => system("perldoc -V &>/dev/null")
+                # "system('perldoc -V &>/dev/null')" appears shorter, but may not
+                # do what you expect ( it still returns 0 on debian squeeze with
+                # dash as system shell even if cannot find the command in $PATH)
+                -noperldoc => system('perldoc -V >/dev/null 2>&1')
             );
         },
     ) or pod2usage;
--- a/bin/zone-mk	Tue May 24 09:40:39 2011 +0200
+++ b/bin/zone-mk	Tue May 24 11:05:33 2011 +0200
@@ -27,7 +27,10 @@
         "m|man"   => sub {
             pod2usage(
                 -verbose   => 2,
-                -noperldoc => system("perldoc -V &>/dev/null"),
+                # "system('perldoc -V &>/dev/null')" appears shorter, but may not
+                # do what you expect ( it still returns 0 on debian squeeze with
+                # dash as system shell even if cannot find the command in $PATH)
+                -noperldoc => system('perldoc -V >/dev/null 2>&1'),
                 -exit      => 0
             );
         },
--- a/bin/zone-rm	Tue May 24 09:40:39 2011 +0200
+++ b/bin/zone-rm	Tue May 24 11:05:33 2011 +0200
@@ -24,7 +24,10 @@
             pod2usage(
                 -exit      => 0,
                 -verbose   => 2,
-                -noperldoc => system("perldoc -V &>/dev/null")
+                # "system('perldoc -V &>/dev/null')" appears shorter, but may not
+                # do what you expect ( it still returns 0 on debian squeeze with
+                # dash as system shell even if cannot find the command in $PATH)
+                -noperldoc => system('perldoc -V >/dev/null 2>&1')
             );
         },
       )