|Don't ask to ask, just ask|
[Parrot] tracing method callsby Thilosophy (Curate)
|on May 25, 2005 at 00:30 UTC||Need Help??|
Thilosophy has asked for the
wisdom of the Perl Monks concerning the following question:
Monks and pirates,
I have a Parrot assembly language / runtime question:
As part of a test case I need to trace method calls on a certain PMC instance. I set out to write a Decorator class, that will wrap the original object and print trace messages before calling any of the methods.
Now, if I were to do this in Perl, I would use AUTOLOAD to generate all the wrapper methods. Can I do something similar in Parrot IMC or do I have to manually code them (probably using macros)?
Also, do I need to use this Decorator at all? Is there an easier way to get a trace output of all method calls (I would need this filtered for only a specific class if not instance)?