Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: [Parrot] tracing method calls

by chip (Curate)
on Jun 14, 2005 at 07:59 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://466419]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-20 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found