http://www.perlmonks.org?node_id=120302


in reply to Regarding B::Deparse

This might be slightly off, but maybe not. I responded to a post by George_Sherston a while ago, something about Getting_Data_from_an__END__block or something. The interesting thing that came out of that was the apparent funkiness when you do something like
my $var = $_ while (<DATA>);
When I run this under strict with Perl 5.6.1 and I immediately print out $var I get... nothing. No errors, no values, nothing. Even though I would expect to get the last line from DATA. I noticed that when I ran your code above I had the same behavior, that is, it printed nothing. When I ran this with Devel::Peek I saw that the pIOK and IOK flags are not set on the variable, but that it has had something assigned to it at some point because when done with strings MAX has some size in there.

Any way, the reason for this rambling is that I've never received a really definitive answer on what's going on here, except the nebulous <q\i>"Huh, must be some bug" I got from the comp.lang.perl.moderated list. I looked briefly in the bug list and didn't see anything like this, but I'm a bit new to internals so I easily could've missed it.

I guess I'm just wondering if this is connected to the odd closure behavior or perhaps has something to do with why the decompiled code looks like it does (because that's sorta the way it behaves, though not really).

I hope this wasn't too incoherent and random.

Ira,

"So... What do all these little arrows mean?"
~unknown