Skip Menu |
 

This queue is for tickets about the Data-Visitor CPAN distribution.

Report information
The Basics
Id: 72899
Status: new
Priority: 0/
Queue: Data-Visitor

People
Owner: Nobody in particular
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.27
Fixed in: (no value)



Subject: Typeglob handling is quirky, also behavior varies by Perl version
Compare the output of these slight variations (running under perl-5.8.9): perl -MData::Dumper -MData::Visitor::Callback \ -e '$in = { foo => \*STDERR }; $out = Data::Visitor::Callback->new( glob => sub { *{$_} }, plain_value => sub { $_ })->visit($in); print Dumper($out)' ### Output: $VAR1 = { 'foo' => \*::STDERR }; # notice the reference that stays perl -MData::Dumper -MData::Visitor::Callback \ -e '$in = { foo => \*STDERR }; $out = Data::Visitor::Callback->new( glob => sub { *{$_} })->visit($in); print Dumper($out)' ### Output: $VAR1 = { 'foo' => *::STDERR }; # notice the reference that disappears Now the same programs running under perl-5.10.1 have this output, respectively: ### Output: $VAR1 = { 'foo' => undef } # now undefined ### Output: $VAR1 = { 'foo' => *::STDERR } # now still disappearing reference If I change the \*STDERR in these programs to just *STDERR, any use of plain_value => sub { $_ } causes the value to become undefined.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.