in reply to Re: dumping lexical filehandles (not in STASH)
in thread dumping lexical filehandles (updated)

you're right and I think I isolated the problem...

Neither Data::Dumper nor Data::Dump are buggy, it's Perl who stores the current package-name into a slot *$fh{PACKAGE} of the globref in $fh

> perl package BLA; $\="\n"; open my $fh,">",'/tmp/tst'; print "globname: ", *$fh{NAME}; print "globpkg: " , *$fh{PACKAGE}; print 'Stashkey $BLA::{$fh} found? ', scalar grep {/\$fh/} keys %BLA:: +; __END__ globname: $fh globpkg: BLA Stashkey $BLA::{$fh} found? 0

*$fh{PACKAGE} should be empty or undef or hold a magic dummy

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)