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

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
Replies are listed 'Best First'.
Re^2: Refactoring: sub within a sub (-w)
by tye (Sage) 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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2015-10-13 22:21 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (316 votes), past polls