Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Redefining Imported Subs: of scope and no

by 7stud (Deacon)
on Feb 09, 2013 at 04:50 UTC ( #1017927=note: print w/ replies, xml ) Need Help??


in reply to Redefining Imported Subs: of scope and no

or even simpler:

use strict; use warnings; no feature "say"; sub say { print "nothing"; } say 'test';

Edit--Hey, that doesn't work! Where's the ability to flip the real say() back on?


Comment on Re: Redefining Imported Subs: of scope and no
Download Code
Re^2: Redefining Imported Subs: of scope and no
by LanX (Canon) on Feb 09, 2013 at 14:37 UTC
    You're confusing me!

    Why do you always seem to ask me if you reply to someone else?

    Please don't be surprised if I'm not replying.

    And please don't simply change your posts after being proofed wrong in a reply.

    > Where's the ability to flip the real say() back on?

    Just swap no with use!

    feature should be scoped (in this example file scoped), which makes much sense when debugging!

    Otherwise the OP could (like already shown) do "use if" for testing a global constant like main::VERBOSE spreading all files.

    Anyway manipulating say for debugging purpose is such a broken idea that I don't wanna invest more into this discussion... :)

    Cheers Rolf

      And please don't simply change your posts after being proofed wrong in a reply.

      Huh? Where? What? Are you talking about the post where I congratulated you on such a simple solution? I didn't see where you 'proofed' that offering congratulations was wrong?
        the one about "goatse getting into the wheels of your bike" or so in this post

        EDIT: you practically deleted everything I didn't quote in the reply.

        Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-09-20 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls