Did you read the "motivation" part? :)
Yes, I did. And I can't see any bug there regarding DATA. Maybe I don't get the point.
package Quux; our $foo = "blorflydick"; print "in Quux\n"; print while <DATA>; print $foo,$/; 1; package blorflydick; print $foo,$/; __DATA__ blorf, blorf.
#!/usr/bin/perl use Foo; use Bar; use Quux; print while <DATA>; print "Foo (",fileno Foo::DATA, ")\n"; print while <Foo::DATA>; print "Bar (",fileno Bar::DATA, ")\n"; print while <Bar::DATA>; print "Symbol table Quux::\n"; print "$_ => $Quux::{$_}\n" for sort keys %Quux; print "Symbol table blorflydick::\n"; print "$_ => $blorflydick::{$_}\n" for sort keys %blorflydick::; print "Quux (",fileno Quux::DATA, ")\n"; print while <Quux::DATA>; print "ok, trying blorflydick\n"; print "blorflydick (",fileno blorflydick::DATA, ")\n"; print while <blorflydick::DATA>; package Baz; __DATA__ so this works. __END__ in Quux blorflydick blorflydick Foo (4) Foo foo foo foo Bar (5) print Bar. I told you so. Symbol table Quux:: Symbol table blorflydick:: DATA => *blorflydick::DATA Quux () ok, trying blorflydick blorflydick (6) blorf, blorf.
I think of the DATA filehandle as an alias to the fully qualified DATA filehandle with similar semantics as our, with the difference that it isn't file scoped like our variables are.
So, the blorflydick::DATA filehandle points to Quux.pm which is not a bug IMHO.
In reply to Re^3: Filehandle of the current sourcecode, pointing after last code line?
by shmem
in thread Filehandle of the current sourcecode, pointing after last code line?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |