In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/e47aeb2216a047eb0bd36de07ff716103c3d29c5?hp=2ec31dd9f923af3a899842b086bdc04c45569b29>
- Log ----------------------------------------------------------------- commit e47aeb2216a047eb0bd36de07ff716103c3d29c5 Author: Father Chrysostomos <spr...@cpan.org> Date: Sun Oct 3 14:06:14 2010 -0700 Add a refgen+PADTMP test ----------------------------------------------------------------------- Summary of changes: 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 52a4d2a..91ba491 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 } -- Perl5 Master Repository