in reply to Polymorphic prototypes? (creating new syntax)
I would use intuitive solution 2 and use the sub keyword to generate closures on the fly. That is instead of typing
you would type:my_func {block1} {block2} $arg;
Now if that is not the syntax you want, you can try (I have not so no idea how hard this will be) to play games with Filter::Util::Call to define a custom language. Similarly you could do something like use Parse::RecDescent to parse the configuration, generate equivalent Perl code from slight markups, and then eval that.my_func(sub {block1}, sub {block2}, $arg);
Too get a sense of how far you can go with those ideas, take a look at Lingua::Romana::Perligata (but don't blame me if you lose your sanity)...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: Polymorphic prototypes? (creating new syntax)
by kaatunut (Scribe) on Apr 08, 2001 at 22:27 UTC | |
by tilly (Archbishop) on Apr 08, 2001 at 22:36 UTC | |
by princepawn (Parson) on Apr 09, 2001 at 21:01 UTC | |
|
Re: Re (tilly) 1: Polymorphic prototypes? (creating new syntax)
by princepawn (Parson) on Apr 09, 2001 at 21:02 UTC | |
by tilly (Archbishop) on Apr 09, 2001 at 21:12 UTC |