diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-24 22:28:34 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-25 05:36:56 -0800 |
commit | 60f71a82f635e2a8a70b36c2a82b27b78602408f (patch) | |
tree | 643e76cf4422f927444b71b372c3cd74462282bc /t | |
parent | 71faf10a29dcbf55255bd39e6d95e5abbe97958b (diff) | |
download | perl-60f71a82f635e2a8a70b36c2a82b27b78602408f.tar.gz |
Allow \(&sub) for & proto
I accidentally broke this in e41e9865. Prior to this commit,
\&foo was becoming srefgen and \(&foo) was becoming refgen.
Srefgen is a slightly faster version of refgen that only han-
dles one item. The easiest fix was to change the logic
in op.c:ck_spair so that \(&sub) with parens becomes srefgen.
Diffstat (limited to 't')
-rw-r--r-- | t/comp/proto.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/comp/proto.t b/t/comp/proto.t index 0858160097..44b2f6a4a1 100644 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -18,7 +18,7 @@ BEGIN { # strict use strict; -print "1..206\n"; +print "1..207\n"; my $i = 1; @@ -285,6 +285,7 @@ sub tmp_sub_1 { printf "ok %d\n",$i++ } a_sub { printf "ok %d\n",$i++ }; a_sub \&tmp_sub_1; +a_sub \(&tmp_sub_1); @array = ( \&tmp_sub_1 ); eval 'a_sub @array'; |