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

Re^2: use of "use X"

by chromatic (Archbishop)
on Jan 18, 2012 at 21:28 UTC ( #948624=note: print w/replies, xml ) Need Help??

in reply to Re: use of "use X"
in thread use of "use X"

Have tried a few modifications, but none eliminated the 'redefine' warnings when ($debug > 2).

That's because it has a lexical scope, and the scope in your code is the containing block. This ugly alternative works:

BEGIN { warnings->unimport( 'redefine' ) if $debug > 2 }

Improve your skills with Modern Perl: the free book.

Replies are listed 'Best First'.
Re^3: use of "use X"
by Anonymous Monk on Jan 18, 2012 at 22:28 UTC
    It's not ugly - it's Perl. Thank you. Again, great explanations folks - your advice is very much appreciated.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2022-08-12 02:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found