bin/dnsvi
changeset 81 4be1e29fb7f0
parent 78 606f6bae6f43
child 84 0d9901b561f7
equal deleted inserted replaced
80:d706710b95f0 81:4be1e29fb7f0
     8 use if $ENV{DEBUG} => 'Smart::Comments';
     8 use if $ENV{DEBUG} => 'Smart::Comments';
     9 use Getopt::Long;
     9 use Getopt::Long;
    10 use Pod::Usage;
    10 use Pod::Usage;
    11 use File::Copy;
    11 use File::Copy;
    12 use DNS::Vi;
    12 use DNS::Vi;
       
    13 use if $] >= 5.020, experimental => 'smartmatch';
    13 
    14 
    14 sub slurp {
    15 sub slurp {
    15     local $/    = undef;
    16     local $/    = undef;
    16     local @ARGV = @_;
    17     local @ARGV = @_;
    17     <>;
    18     <>;
   129             -debug  => $o{debug},
   130             -debug  => $o{debug},
   130             -key    => $o{key}
   131             -key    => $o{key}
   131         }
   132         }
   132       )
   133       )
   133       or do {
   134       or do {
   134 	  copy($backup->filename, ",dnsvi-$$")
   135 	  if ($backup) {
   135           and say "Saved as ',dnsvi-$$'";
   136 	    copy($backup->filename, ",dnsvi-$$")
       
   137 	    and say "Saved as ',dnsvi-$$'";
       
   138 	  }
   136       };
   139       };
   137 
   140 
   138     goto CONFIRM if $_ eq 'V';
   141     goto CONFIRM if $_ eq 'V';
   139 
   142 
   140     return 0;
   143     return 0;