in reply to Parsing barewords as sub/method calls?
This looks interesting but I do not fully understand.
You do not want to pre-declare also not to pollute the callers naming space. Does this mean that for the following code
BLA 1,2,3; within_myDSL { BLA 1,2,3 }
the first BLA should raise an error, whereas the second one would call AUTOLOAD?
That looks difficult to achieve.
I thought to move the pre-declaration into the package like this:
use subs qw( BLA ); package iDSL; # package code 1;
but that would pollute the callers space as well.
More generally, how would one define such an internal DSL, so that code like within_myDSL { >>different rules here<< } is possible?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing barewords as sub/method calls?
by LanX (Saint) on Nov 23, 2013 at 18:25 UTC |