the compiler would have to either re-read the file (breaking STDIN, as per merlyn's comment
Why is this an argument? If "this feature can't be used on STDIN", why does perl have a -i option? That can't be applied to STDIN either - and -i is then silently ignored. If one were to implement such a __BEGIN__ token (not that I'm advocating this), it would be rather simple to decide what should be done in case of a program passed from STDIN. Heck, one can't seek the DATA file handle from a program found on STDIN either.
would have to store a potentially enormous file (plus dependencies) in memory before compilation could truly begin
Considering that the optree + perl binary + data for perl itself usually measures at least a couple of megabytes, this isn't a real argument, is it? While it's not impossible to create a file of a few megabytes that, when compiled, actually takes less memory, it's not something to worry about.

I think the only reason this feature isn't there is because it's not useful enough to implement it. Besides, there's already 'perl -x'. Breaking STDIN and "takes too much memory" aren't real arguments.


In reply to Re^2: __END__ without __BEGIN__? by Anonymous Monk
in thread __END__ without __BEGIN__? by ktross

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.