In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/3bbc3d3032212ca88eda829355f4e66179b013ad?hp=104a6083eb9b92b53cb9d607a7d4e14d371d32e1>
- Log ----------------------------------------------------------------- commit 3bbc3d3032212ca88eda829355f4e66179b013ad Author: Yves Orton <[email protected]> Date: Sat Jan 28 23:23:07 2012 +0100 fix variable not shared warnings coming from the use statement being executed too early ----------------------------------------------------------------------- Summary of changes: t/re/pat.t | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/re/pat.t b/t/re/pat.t index 6c4cd1a..8ea531c 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -1225,13 +1225,15 @@ EOP { # Concat overloading and qr// thingies my @refs; my $qr = qr//; - package Cat { - use overload + package Cat { + require overload; + overload->import( '""' => sub { ${$_[0]} }, '.' => sub { push @refs, ref $_[1] if ref $_[1]; bless $_[2] ? \"$_[1]${$_[0]}" : \"${$_[0]}$_[1]" } + ); } my $s = "foo"; my $o = bless \$s, Cat::; -- Perl5 Master Repository
