Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Refactoring: sub within a sub

by temporal (Pilgrim)
on Jul 25, 2012 at 20:56 UTC ( #983739=note: print w/ replies, xml ) Need Help??


in reply to Refactoring: sub within a sub

Hm, okay that makes sense. I will probably be fine implementing it like this then. Just wanted to know if there were any major pitfalls or get some insight into an alternative implementation.

Strange things are afoot at the Circle-K.


Comment on Re: Refactoring: sub within a sub
Re^2: Refactoring: sub within a sub (-w)
by tye (Cardinal) on Jul 25, 2012 at 22:46 UTC

    The major pitfall is that, if you ever call the outer sub more than once per process, then the inner sub will not be sharing any lexicals defined within the outer sub, hence the "won't stay shared" warning. So be sure to enable warnings.

    - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-07-23 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls