diff options
Diffstat (limited to 't')
-rw-r--r-- | t/op/ref.t | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/t/op/ref.t b/t/op/ref.t index 52a4d2a011..91ba491c14 100644 --- a/t/op/ref.t +++ b/t/op/ref.t @@ -3,13 +3,13 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); + require 'test.pl'; } -require 'test.pl'; use strict qw(refs subs); use re (); -plan(197); +plan(198); # Test glob operations. @@ -121,6 +121,15 @@ is (join(':',@{$spring2{"foo"}}), "1:2:3:4"); is ($called, 1); } +# Test references to return values of operators (TARGs/PADTMPs) +{ + my @refs; + for("a", "b") { + push @refs, \"$_" + } + is join(" ", map $$_, @refs), "a b", 'refgen+PADTMP'; +} + $subrefref = \\&mysub2; is ($$subrefref->("GOOD"), "good"); sub mysub2 { lc shift } |