Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Redefining Imported Subs: of scope and no

by LanX (Chancellor)
on Feb 09, 2013 at 03:16 UTC ( #1017920=note: print w/ replies, xml ) Need Help??

in reply to Redefining Imported Subs: of scope and no

> Unfortunately I can't have say something like no feature say unless $verbose;, can't use or no in conditional or anything like that.

maybe use feature is special, but normally use if should do that.


works for me:

use strict; use warnings; use constant VERBOSE=>0; use if VERBOSE, feature => "say"; sub say { print "nothing"; } say 'test';

Cheers Rolf

Comment on Re: Redefining Imported Subs: of scope and no
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-11-27 08:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls