Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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.

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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-10-26 02:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.