in reply to Re^4: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)
in thread Perl stops reading __DATA__ when meeting SUB character on Windows

If you're asking if it should, then probably not. I have no idea what it actually does.

I don't see how that's relevant to this situation or the text you quoted. Perl should not have reached the ^Z while reading the source code. It should have found __DATA__ first.

  • Comment on Re^5: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)
  • Download Code

Replies are listed 'Best First'.
Re^6: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)
by tye (Sage) on Jan 06, 2014 at 19:02 UTC
    Perl should not have reached the ^Z while reading the source code. It should have found __DATA__ first.

    So how big of a buffer do you suppose is being used when Perl is reading from a file looking for "__DATA__"?

    - tye        

      Are you saying it's ok for binmode(DATA, ...) only to take effect partway through the data? No, that's a bug.

      It doesn't matter how big the buffer is. It could be big enough to contain the entire file. The parser can't go changing bytes later in the file unless it knows it's safe to do so or it has a means of restoring them. Otherwise, it breaks DATA.

        I give up, since you aren't going to pay enough attention to even follow along effectively.

        - tye