Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: A most obscure bug

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


in reply to Re: Re: A most obscure bug
in thread A most obscure bug

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


Comment on Re: Re: Re: A most obscure bug
Download Code
Re4: A most obscure bug
by blakem (Monsignor) on Dec 20, 2001 at 00:32 UTC
    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

    -Blake

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-08-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls