in reply to Re^3: Hygienic eval of templates with perl code?
in thread Hygienic eval of templates with perl code?
That's one of the standard techniques described in wikipedia, but it's not 100% cause it relies on convention.
And I really prefer lexicals cause there scope is controllable, and I don't need to localize the variables in recursive calls.
Furthermore a full qualified $Some::Really::Long::Package::foo++ can be so cumbersome that people would like using a placeholder again... maybe $<PCKG>::foo .
A lexical variation of this package idea would be just one hash $<MyHash>{foo} and to only assure that this hash's name is unique.
But I admit that in the future I might need to support "safe" package variables for this project too.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
|
|---|