diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 20:46:35 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 20:46:35 -0800 |
commit | 6cee328eb74e2e3a6f30d2fc2f5d3bd30f84763a (patch) | |
tree | 4e096a652f0048d730d9ce65341ef5cd64c4b9c6 /lib/dumpvar.t | |
parent | 05d4ea3f27efa621f7a8beda83407b3d57609b75 (diff) | |
download | perl-6cee328eb74e2e3a6f30d2fc2f5d3bd30f84763a.tar.gz |
Remove use of local($_) from dumpvar.pl
I know we should really be fixing local($_), but that code
in scope.c is rather twisted, and I want to see this fix
in 5.16.
Diffstat (limited to 'lib/dumpvar.t')
-rw-r--r-- | lib/dumpvar.t | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/dumpvar.t b/lib/dumpvar.t index 69ec3b2b1c..f4f55d9744 100644 --- a/lib/dumpvar.t +++ b/lib/dumpvar.t @@ -49,6 +49,11 @@ sub new { my $class = shift; bless [ @_ ], $class } use overload '""' => sub { "Bar<@{$_[0]}>" }; +package Tyre; + +sub TIESCALAR{bless[]} +# other methods intentionally omitted + package main; my $foo = Foo->new(1..5); @@ -318,3 +323,11 @@ EXPECT dumpvalue(bless[1,2,3,4],"a=b=c"); EXPECT /0 a=b=c=ARRAY\(0x[0-9a-f]+\)\n 0 1\n 1 2\n 2 3\n 3 4\n/i +######## +local *_; tie $_, 'Tyre'; stringify(''); +EXPECT +'' +######## +local *_; tie $_, 'Tyre'; unctrl('abc'); +EXPECT +abc |