Problems? Is your data what you think it is? | |
PerlMonks |
Re: Advanced subroutine and symbol table manipultationby mvc (Scribe) |
on Jul 17, 2004 at 00:26 UTC ( [id://375165]=note: print w/replies, xml ) | Need Help?? |
This is a task for the Aspect module.
Sure you could do this with Hook::LexWrap, in fact that is how Aspect does it. But this is easier. The main difference is that you can select entire groups of methods, using a pointcut language. Say you wanted to parenthesize not one method, but all MyPackage methods, except the constructor:
Unfortunately you cannot match by attributes or inheritance yet. And if you want to create a reusable aspect (like the Wormhole):
In Section
Seekers of Perl Wisdom
|
|