in reply to Re^3: parse lisp style config
in thread parse lisp style config
nnested subs provide some more abstraction ability
Not in Perl.
Whether nested or not, the following two snippets are equivalent:[1]
sub foo { ... }
BEGIN { *foo = sub { ... }; }
As such,
As you can see, you gain no abstraction or other benefits. Everything about it is bad.
That said, none of this applies to lexical inner subs. This is fine:
sub outer { ... my sub inner { ... } ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: parse lisp style config
by vincentaxhe (Scribe) on Nov 29, 2024 at 01:38 UTC | |
by ikegami (Patriarch) on Nov 29, 2024 at 05:26 UTC | |
by vincentaxhe (Scribe) on Nov 29, 2024 at 09:35 UTC | |
by hippo (Archbishop) on Nov 29, 2024 at 09:46 UTC | |
by vincentaxhe (Scribe) on Nov 30, 2024 at 09:11 UTC | |
|