Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: curried-up moose

by stvn (Monsignor)
on Jan 19, 2009 at 15:47 UTC ( [id://737316]=note: print w/replies, xml ) Need Help??


in reply to Re^3: curried-up moose
in thread curried-up moose

In fact, handles is a dish I haven't learned to cook. Is there a recipe for it in Moose::Cookbook? Can't find it.

Nothing that specifically does "handles" only, but Dave Rolsky (one of the core Moose team) currently is working on a whole new set of Moose docs through a TPF grant, I suspect he will have something nice in there.

BTW, the POD mentions a tree example built with handles that would become a recipe, but in the binary tree recipe handles are not used at all.

Yes, that became Forest::Tree instead, specifically the 'parent' attribute in that object.

Just one thing, it looks like around [qw[eyes ears nose mouth]] won't work. It should be just a straight array such as:  around qw[eyes ears nose mouth

Sorry, yes that is correct I don't use the feature as often as the has [] one so I mix it up.

I'd still don't get the subtleties of using handles against using MooseX::CurriedHandles --something I'll look into carefully soon.

MooseX::CurriedHandles was originally called MooseX::DeepAccessor but it was expanded and renamed. It is an extension to handles which allows you go even deeper down the method chain if you like. The docs are pretty good, especially the INTERFACE section, however it very much helps to understand vanilla handles first.

RE: MooseX::NestedPackage

This looks interesting, but I am not sure it gives you all that much more over writing the packages yourself. I am of the opinion that optimizing for less typing is not really a large benefit. This is not to say that all languages should be as verbose as Java or C#, but that for real-world code it is not a true savings over the long term as it almost always needs to be un-golfed in the end. But that is simply my opinion, so take it with a big giant hunk of salt. You might want to take this to the mailing list (moose@perl.org) and see if anyone else has tried this or would be interested in it.

-stvn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found