Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Safer monkey-patching

by Anonymous Monk
on Jan 19, 2012 at 10:42 UTC ( #948751=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Safer monkey-patching
in thread Safer monkey-patching

... BEGIN ... perlobj ... parent ... perspective ..

By the time you load Data::Dumper or whatever, resolution method could have happened

But yeah, I did say I vaguely recall, esp because I didn't feel like digging up history or pinning down the details :)

As for parent... perspective is exactly the point. If you're bothering to write a module to share, you might as well do it right, which is not dickering around with other peoples class data :) delegate (AUTOLOAD or ...)

At least if you monkey patch, warnings will issue "Subroutine %s redefined"

With Moose it happens at run-time, and this doesn't seem to cause any problems.

Sure it does :) Moose Cookbook - Meta Recipe 5 Won't Run


Comment on Re^3: Safer monkey-patching

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-30 19:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls