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.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.