Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Perl stops reading __DATA__ when meeting SUB character on Windows (history)

by ikegami (Pope)
on Jan 06, 2014 at 11:54 UTC ( #1069492=note: print w/ replies, xml ) Need Help??


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

That it predates your history with Perl on MS Windows (or just your memory) doesn't cause thaat history to no longer exist.

1. The OP is using binmode. That should never stop at ^Z!

2. Unless you're saying the OP is using a Perl older than 5.6, I don't see your point. I consider anything older than 5.8 irrelevant unless explicitly mentioned.

Your program produces 4 for me, whether bindmode is commented out or not (v5.12).

Then I ask you the same question I asked the OP: Could I see your perl -V output?

Update: I'm sure I had an old version of Perl that didn't treat ^Z specially, but it doesn't seem to be the case. It does appear to be a new fix, so disregard the request. I couldn't test until now.


Comment on Re^3: Perl stops reading __DATA__ when meeting SUB character on Windows (history)
Download Code
Re^4: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)
by tye (Cardinal) on Jan 06, 2014 at 18:07 UTC

    Part of the puzzle might be p5git://commit=9b1f1815, which became part of v5.14.

    The OP is using binmode. That should never stop at ^Z!

    So if Perl hits EOF due to CTRL-Z (while reading source code), then subsequently doing binmode will clear that EOF condition?

    - tye        

      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.

        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        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1069492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-08-01 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls