develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123721] Dumper loses blessedness from unreferenced scalars

From:
Tony Cook via RT
Date:
February 26, 2015 04:26
Subject:
[perl #123721] Dumper loses blessedness from unreferenced scalars
Message ID:
rt-4.0.18-6814-1424924802-1688.123721-15-0@perl.org
On Tue Feb 03 03:31:55 2015, zefram@fysh.org wrote:
> $ perl -MData::Dumper=Dumper -we '@a=(3); bless \$a[0], "Foo"; print
> Dumper \$a[0]; print Dumper \@a'
> $VAR1 = bless( do{\(my $o = 3)}, 'Foo' );
> $VAR1 = [
>           3
>         ];

Similarly:

 $ ./perl -Ilib -MData::Dumper -le '$x = 3; bless \$x, "Foo"; print Dumper($x)'
 $VAR1 = 3;

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=123721



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About