Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^9: Moose: What about "class" attributes?

by stvn (Monsignor)
on May 03, 2011 at 18:54 UTC ( #902760=note: print w/replies, xml ) Need Help??

in reply to Re^8: Moose: What about "class" attributes?
in thread Moose: What about "class" attributes?

So the design of Param Role goes through all the trouble of making the params full-blown Moose Attributes rather than just arguments, and a parameter object rather than a hashref, but then you are careful not to close over either of them but only on plain values extracted from them.

No, those are parameters, they just look like Moose attributes, but underneath they are different.

Ref-counting leaks would be some kind of circular reference that the system is not tracking correctly. Or for whatever reason, the past existence of such leaks is why you are leery of closing over the complicated linked-up Moose objects involving anonymous classes.

Yes, Perl is pretty good at doing this, but sometimes if you have values passed around a lot inside objects, you can get a reference you didn't intend to keep. And closures tend to be a big source of these since people don't often notice all that it is they are closing over.

  • Comment on Re^9: Moose: What about "class" attributes?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-12-02 14:10 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (41 votes). Check out past polls.