Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Intercept all object method calls with Moose

by elTriberium (Friar)
on Jul 02, 2012 at 17:41 UTC ( [id://979474]=note: print w/replies, xml ) Need Help??


in reply to Re: Intercept all object method calls with Moose
in thread Intercept all object method calls with Moose

OK, thanks, I understand that the methodA accessor call was dying, I was only wondering whether I could somehow easily intercept ALL method calls of an attribute in the calling class. In your example (which is helpful, thanks for that), it's not the calling class, but the called class which intercepts the methods.

I'll have to think about if I want to use it this way, it's effectively a new derived class just for this. Maybe just handling it manually in the calling class (by putting an eval around each method call) is the better way to go. Thanks for your input again!

  • Comment on Re^2: Intercept all object method calls with Moose

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-25 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found