Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Problem generating builder functions with Moose for inherited objects

by tospo (Hermit)
on Sep 07, 2010 at 09:02 UTC ( [id://859128]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Problem generating builder functions with Moose for inherited objects
in thread Problem generating builder functions with Moose for inherited objects

You have the Moose::Meta::Attribute object already in $build_attribute in the outer loop, so you can do your test simply on that one:
$result = $build_attribute->type_constraint->is_a_type_of('ArrayRef') +? 'it's an ArrayRef' :'not an ArrayRef';
I just tried this in one of my Moose classes and it works for me that way.
  • Comment on Re^3: Problem generating builder functions with Moose for inherited objects
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found