in reply to RE: RE (tilly) 2: access to my variables from other subs
in thread access to my variables from other subs
The beauty there is, depending on your encapsulation paranoia, you still have access to the hash through the reference, so working with its data is as easy as usual.
Nesting subroutines is a conceptual no-no in Perl... hard to maintain, hard to debug. The closures route is a little tricky if you're not familiar with functional programming (but can be very useful in other cases).
If you can live with enforced lexical context through a reference, you'll be a lot happier with objects.
|
|---|