in reply to Re: Defining a sub within a sub: OK?
in thread Defining a sub within a sub: OK?
I consider it a bad idea to define a named sub within another sub
I agree 100%. Anon subs are another story. For example, I use constructs such as
sub foo { my $shared_with_all_recur = ...; local *_recur = sub { ... _recur(...); ... }; _recur(...); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Defining a sub within a sub: OK?
by AnomalousMonk (Archbishop) on Oct 15, 2009 at 08:08 UTC | |
by ikegami (Patriarch) on Oct 15, 2009 at 12:49 UTC |