Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Errors in some perl modules

by aufflick (Deacon)
on May 29, 2009 at 14:15 UTC ( #766867=note: print w/ replies, xml ) Need Help??


in reply to Errors in some perl modules

Those messages are not errors, they're warnings. They are both warning you that variables are being used before they are set to anything. Imagine something like:

my $var1; my $var2; $var1 = "Something"; print $var1 . $var2;
You can see that $var2 has not been set to anything. In Perl that is not an error, since an undefined value becomes a blank string in string context, but it is a pointer to sloppy coding or a mistake - hence why you get the warning when perl warnings are turned on.

Update: Original had a typo where I said $var1 instead of $var2. Thanks to AnomalousMonk


Comment on Re: Errors in some perl modules
Download Code
Re^2: Errors in some perl modules
by MidLifeXis (Prior) on May 29, 2009 at 15:10 UTC

    You may also be using

    #!perl -w

    instead of

    #!perl use warnings;

    The first turns on warnings in modules as well as in the main program. The second ignores, for better or worse, warnings in any included modules.

    --MidLifeXis

    The tomes, scrolls etc are dusty because they reside in a dusty old house, not because they're unused. --hangon in this post

Re^2: Errors in some perl modules
by ikegami (Pope) on May 29, 2009 at 17:42 UTC

    Those messages are not errors, they're warnings.

    Those messages are warnings and might not be errors.

    But in my experience, warnings almost always errors in Perl.

      But in my experience, warnings almost always errors in Perl.

      Yes, if only because it is an error to get warnings and not heed them... ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-08-20 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (118 votes), past polls