Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Help! My variables are jumping off a cliff!

by tangent (Deacon)
on Feb 26, 2012 at 04:48 UTC ( #956185=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Help! My variables are jumping off a cliff!
in thread Help! My variables are jumping off a cliff!

I would consider your example a coding problem, a mistake I would expect warnings to catch, not strict. My original comment was just a play on words - my( declare ), kamikaze( specific type of suicide )


Comment on Re^3: Help! My variables are jumping off a cliff!
Re^4: Help! My variables are jumping off a cliff!
by oko1 (Deacon) on Feb 26, 2012 at 05:05 UTC

    OK, thanks for clarifying. I'm just seriously surprised that Perl, which is an extraordinarily sensible language in most other ways, doesn't have a more definite response to this kind of mistake - one that can easily be made unintentionally - in coding. I'm even more surprised that it doesn't seem to bother other people.

    -- 
    I hate storms, but calms undermine my spirits.
     -- Bernard Moitessier, "The Long Way"
      I hear what you're saying oko1, but isn't use warnings a valid response? I mean, where would you draw the line with strict if you start looking at all the other problems you can run into?

        The field of problems that are a) always errors, b) detectable, and c) easily made unintentionally is not very large. Also, the docs for 'strict' specifically mention 'vars' as being intended to prevent variable suicide - which it fails to do in this case. Currently, the only thing that we've got is a mildly-phrased warning; in fact, it's classified as 'misc' in the warnings hierarchy.

        That just seems totally inappropriate to me - particularly when compared to the way this kind of error is treated in other languages.

        -- 
        I hate storms, but calms undermine my spirits.
         -- Bernard Moitessier, "The Long Way"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-10-26 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls