Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Override new in Moose for flyweight objects

by Aaronrp (Scribe)
on Apr 09, 2020 at 01:11 UTC ( [id://11115251]=note: print w/replies, xml ) Need Help??


in reply to Re: Override new in Moose for flyweight objects
in thread Override new in Moose for flyweight objects

Well I'm feeling a bit better about myself since it turns out MooseX::Role::Flyweight also calls BUILDARGS twice, it's just careful to pass the original arguments to the new in Moose::Object, rather than the already-processed ones. You just hope the BUILDARGS it's calling doesn't do anything that is a problem if it's done more than once.

I couldn't seem to figure out how to override _generate_fallback_constructor (from Class::MOP::Class) on a metaclass instance (I tried making a role with a method by that name and applying it, but it didn't seem to work). My head starts to spin whenever I think too much about applying roles to instances of metaclasses.

  • Comment on Re^2: Override new in Moose for flyweight objects

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found