equal
deleted
inserted
replaced
22 $file = get_file($1) if $file =~ /(.*)\*$/; |
22 $file = get_file($1) if $file =~ /(.*)\*$/; |
23 |
23 |
24 given ($file) { |
24 given ($file) { |
25 when (/\.gz\.x$/) { |
25 when (/\.gz\.x$/) { |
26 open(my $fh => "openssl @{[CIPHER]} -d -pass $::o{pass} -in $file|"); |
26 open(my $fh => "openssl @{[CIPHER]} -d -pass $::o{pass} -in $file|"); |
27 local $/ = undef; |
|
28 gunzip($fh => $buffer) or die $GunzipError; |
27 gunzip($fh => $buffer) or die $GunzipError; |
29 } |
28 } |
30 when (/\.gz$/) { gunzip($file => $buffer) or die $GunzipError } |
29 when (/\.gz$/) { gunzip($file => $buffer) or die $GunzipError } |
31 when (/\.x$/) { |
30 when (/\.x$/) { |
32 open(my $fh => "openssl @{[CIPHER]} -d -pass $::o{pass} -in $file|"); |
31 open(my $fh => "openssl @{[CIPHER]} -d -pass $::o{pass} -in $file|"); |
33 local $/ = undef; |
|
34 $$buffer = <$fh>; |
32 $$buffer = <$fh>; |
35 } |
33 } |
36 default { open(my $fh => $file); local $/ = undef; $$buffer = <$fh> } |
34 default { open(my $fh => $file); sysread $fh => $$buffer, -s $fh } |
37 } |
35 } |
38 } |
36 } |
39 |
37 |
40 1; |
38 1; |