Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: [Parrot] tracing method calls

by chip (Curate)
on Jun 14, 2005 at 07:59 UTC ( #466419=note: print w/replies, xml ) Need Help??

in reply to [Parrot] tracing method calls

I'm just learning the code base ... which is an odd position for a Fearless Leader ("OK, Mr. President. You've been elected by this country ... no, the top of the globe..."). But it looks to me like to do what you want without writing a bunch of explicit wrappers, until we have a PerlObject PMC that implements AUTOLOAD which could handle it, you'll have to write a PMC of your own.

I'll call this new PMC ObjectWrapper. Give ObjectWrapper a customized find_method() vtable function that always returns your chosen wrapper function, which can do whatever recording you like then look up the actual method by name in the actual target object.

This is all pretty much the way it should be, except (1) we will have autoload-ish behavior available in a standard PMC eventually, and (2) there's no reason this sort of custom behavior should require writing in C anyway. Eventually. :-,

    -- Chip Salzenberg, Free-Floating Agent of Chaos

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466419]
and a kettle whistles...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-03-23 07:50 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (288 votes). Check out past polls.