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

Re^2: Debugging "Use of uninitialized value" warnings.

by cwry (Monk)
on Apr 04, 2007 at 04:24 UTC ( #608202=note: print w/replies, xml ) Need Help??


in reply to Re: Debugging "Use of uninitialized value" warnings.
in thread Debugging "Use of uninitialized value" warnings.

Agreed. I generally try to code defensively, but in the context of my original question, I am trying to make the defensive code implicit (Perl automatically tells me when and where I used an uninitialized variable) rather than explicit (adding code to check if a variable is unitialized then dying/warning if it is).

Both have the same result, but I think the former results in cleaner code.

  • Comment on Re^2: Debugging "Use of uninitialized value" warnings.

Replies are listed 'Best First'.
Re^3: Debugging "Use of uninitialized value" warnings.
by gloryhack (Deacon) on Apr 04, 2007 at 04:54 UTC
    It'd be a handy feature to have, certainly, but I'm not aware of any easy way to get it. If there were a pragma to turn on verbose warnings of that kind, I'd have a new love.

    My wife might not like it, though, because I'd spend all of my days and nights just gazing lovingly at perl...

      You mean no warnings 'uninitialized';?
        Not at all. I mean more like use warnings 'verbose', if it existed, so that instead of use of uninitialized... we'd get $foo is uninitialized in... at line 42.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608202]
help
Chatterbox?
[tobyink]: 1nickt: your code?
[LanX]: pryrt: yeah, that's why I didn't consider, but the last >10 anonymous posts are from the same troll-person
[jdporter]: is there a module for expanding tabs in text?
[jdporter]: A: yes.
[Lady_Aleena]: I don't know how hard it will be to get out of that mess.
[LanX]: M-x untabify
[choroba]: I don't think they're multiple people. I was told "he or she" sounds old-fashioned and "they" is the way to say it
[pryrt]: Those others were definitely offensive or unequivocably rude, I agree.
[choroba]: (well, it comes from the 14th century, so labelling it as "modern" doesn't seem appropriate)
[Your Mother]: "They" is becoming accepted but it irritates me sometimes. I tend to just pick she or he randomly or try to use "one."

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (17)
As of 2017-05-24 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?