Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Refactoring: sub within a sub (-w)

by tye (Sage)
on Jul 25, 2012 at 22:46 UTC ( #983747=note: print w/replies, xml ) Need Help??


in reply to Re: Refactoring: sub within a sub
in thread Refactoring: sub within a sub

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        

  • Comment on Re^2: Refactoring: sub within a sub (-w)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983747]
help
Chatterbox?
[marto]: Salami_slicing
[Corion]: marto: Aah ;) Yeah - I guess I'll make the first changes to the old module, by extending its test suite to be more lenient, and then the switch to the new results should still pass the test suite :-D

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2018-07-16 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (333 votes). Check out past polls.

    Notices?