in reply to Re: lexicaly scoped export of variables?
in thread lexicaly scoped export of variables?
I can't put too much dependencies into it so I approached it with PadWalker. (see next post)
But looking into your approach, I'd like to know if it's possible to hook into the parser to implement a macro mechanism like this.
Like:
a) parse call-statements like my_call(1,2,3)
b) check if sub my_call is a macro
c) if no continue as usual and create entersub opcode
d) if yes execute macro my_call with parsed parameters as strings exp('1','2','3')
e) inject returned string as code
f) continue with next statement
Is this feasible??? :)
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: lexicaly scoped export of variables? (macro)
by tobyink (Canon) on Mar 31, 2014 at 21:55 UTC | |
by LanX (Saint) on Apr 01, 2014 at 00:25 UTC | |
by tobyink (Canon) on Apr 01, 2014 at 12:54 UTC |