Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Difference between 'use warnings' and '-w' switch

by monkey_boy (Priest)
on Jan 11, 2006 at 12:29 UTC ( #522419=note: print w/ replies, xml ) Need Help??


in reply to Difference between 'use warnings' and '-w' switch

this is the full line from that module:

my $size = do { local $^W; -f $local && -s _ };

note, he locally turns off the warnings , (old style -w/$^W warnings);


This is not a Signature...


Comment on Re: Difference between 'use warnings' and '-w' switch
Download Code
Re^2: Difference between 'use warnings' and '-w' switch
by muntfish (Chaplain) on Jan 11, 2006 at 13:02 UTC

    Thanks - actually the line in my version (2.70) is:

    $ftp->_ALLO(-s _) if -f $loc;

    And since there is no code to initialise $loc before this line, it will always produce a warning. It looks like this has been fixed in later versions (I checked 2.75 from CPAN) - it has been changed to the line you describe (note $local not $loc).

    Thanks.


    s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-07-07 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls