Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^6: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)

by tye (Sage)
on Jan 06, 2014 at 19:02 UTC ( #1069571=note: print w/replies, xml ) Need Help??


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

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        

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

Replies are listed 'Best First'.
Re^7: Perl stops reading __DATA__ when meeting SUB character on Windows (commit)
by ikegami (Pope) on Jan 08, 2014 at 14:55 UTC

    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        

        binmode now *does* work properly, whatever size the buffer is. You must think it very odd that p5p was able to fix this bug! How is it that I'm the one who's not following???

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1069571]
help
Chatterbox?
[Discipulus]: good morning monks! town holiday here.. but super busy
Discipulus time is not comarable with money.. when you have a roof and something to eat
[Corion]: Hi Discipulus! Busy making the town better? ;)
[Discipulus]: the house I hope.. now i'm going on the roof putting some protection for the sun. afternoon 150 km for a water polo training (son, obviously..)
[Corion]: Discipulus: Ah - lazy roof-sitting ;)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-06-29 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (655 votes). Check out past polls.