Avoid perl 5.20 specific construct

Fixes caff with perl 5.18

Submitted by:	Mike Burns
This commit is contained in:
Johan van Selst 2015-04-27 19:31:23 +00:00
parent 7c59a19689
commit b5cc7abc8f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=384866
2 changed files with 16 additions and 0 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= signing-party
PORTVERSION= 2.0
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ftp://ftp.stack.nl/pub/users/johans/signing-party/ \
${MASTER_SITE_DEBIAN}

View file

@ -0,0 +1,15 @@
Avoid construct that only works in perl 5.20
--- caff/caff.orig 2015-04-27 21:19:22.000000000 +0200
+++ caff/caff 2015-04-27 21:19:28.000000000 +0200
@@ -714,7 +714,9 @@ sub readwrite_gpg($%) {
# ignore direct and dup handles
my @infhs = grep {defined $opts{$_} and !$handles->options($_)->{direct} and $handles->{$_} !~ /^[<>]&/} qw/stdin passphrase command/;
my @outfhs = grep {defined $handles->{$_} and !$handles->options($_)->{direct} and $handles->{$_} !~ /^[<>]&/} qw/stdout stderr status logger/;
- my %fh = reverse %$handles{@infhs, @outfhs};
+ my %fh;
+ $fh{$_} = $handles->{$_} foreach (@infhs, @outfhs);
+ %fh = reverse %fh;
my %offset = map {$_ => 0} @infhs;
my %output = map {$_ => ''} @outfhs;