|
|
| more useful options | |
| PerlMonks |
Re: Symbol ? Re: Sub::Lexicalby broquaint (Abbot) |
| on May 15, 2002 at 23:01 UTC ( #166867=note: print w/ replies, xml ) | Need Help?? |
|
maybe Symbol (even in the core distribution) could be of help hereI'll try incorporating that at some point to see how it fares, it will certainly save on the variable munging trickery. Update: on second thoughts, this won't save variable name munging at all as I still have to create a lexical variable to assign to the glob etc etc If only I could create my own temporary lexical scopes to declare them in, hmmm ... I believe that things get nasty if you nest subs two levels deep (or deeper) - that's one thing I miss from Pascal.Nope, that's the beauty of lexical subs - you can nest to your hearts content! The problem with nesting subs is explored here and this module fixes that issue to a degree by hiding by the nested subs as anonymous subs tied to lexicals variables, so you're not really nesting subs at all (but who's the wiser ? ;-) HTH
_________
In Section
Code Catacombs
|
|
||||||||||||||||||||