Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: A most obscure bug

by chip (Curate)
on Dec 19, 2001 at 12:46 UTC ( #133063=note: print w/replies, xml ) Need Help??

in reply to A most obscure bug

Nice work, robin!

But now your meditation has made me curious about the origin of the bug you found. Was the implied-defined() feature broken from the beginning -- which seems unlikely -- or was it broken later and nobody noticed, and if so, how and when?

sigh So many intriguing bugs, so little time.

    -- Chip Salzenberg, Free-Floating Agent of Chaos

Replies are listed 'Best First'.
Re: Re: A most obscure bug
by robin (Chaplain) on Dec 19, 2001 at 17:30 UTC
    As far as I can tell, it was broken from the beginning. I haven't managed to track down the original patch which added the implicit defined() feature though.

    Can you remember when it was added? Was it during your reign, or later than that?

      The automatic implied defined() was added after my time as pumpking. When I discovered the danger of while (<>) {}, I didn't feel I could change the language without breaking things, so I added a warning instead. That warning was unsatisfactory to a lot of people, so the issue came up again, this time during one of Larry's more available periods. Somebody proposed the language change we have today, Larry OK'd it, and the patch was installed almost immediately.

          -- Chip Salzenberg, Free-Floating Agent of Chaos

        Interestingly, your warning is still in effect. The only way I can throw it is through this bug:
        # OK, gets implied defined(), no warning, correct output % perl -lwe 'print while glob("{dog,cat,0,pig,cow}")' dog cat 0 pig cow # Buggy, no implied defined(), throws warning and misbehaves % perl -lwe 'print while $_ = glob("{dog,cat,0,pig,cow}")' Value of glob construct can be "0"; test with defined() at -e line 1 +. dog cat


Re^2: A most obscure bug
by robin (Chaplain) on Jan 16, 2007 at 14:36 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-07-30 03:24 GMT
Find Nodes?
    Voting Booth?

    No recent polls found