in reply to Re^7: parse lisp style config
in thread parse lisp style config
You haven't shown your code but it's a fair guess that you haven't used __SUB__ like the documentation tells you to do:
my sub baz { __SUB__->(); # calls itself }
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: parse lisp style config
by vincentaxhe (Scribe) on Nov 30, 2024 at 09:11 UTC | |
Last time I just add my to two subs do recusion, and die with 'undeined sub', now I replace it with __SUB__, still 'Undefined subroutine &MyPairList::__SUB__ called at /usr/local/bin/MyPairList.pm line 23, <> line 1.' It did not work. | [reply] [d/l] |
by hippo (Archbishop) on Nov 30, 2024 at 11:51 UTC | |
use feature 'current_sub'; ... as directed in the documentation. 🦛 | [reply] [d/l] |
by ikegami (Patriarch) on Nov 30, 2024 at 17:19 UTC | |
Or use v5.16;. | [reply] [d/l] |
by vincentaxhe (Scribe) on Dec 01, 2024 at 04:07 UTC | |
by ikegami (Patriarch) on Nov 30, 2024 at 17:40 UTC | |
You have this:
Sometimes you pass tokens to it. Sometimes you don't. That's weird and confusing. Fixed:
The lack of error checking is disturbing. Fixed:
Without recursion:
| [reply] [d/l] [select] |
by vincentaxhe (Scribe) on Dec 01, 2024 at 06:53 UTC | |
Every line can only brankets closed if not open or pure ')' | [reply] [d/l] |