Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Moo different parameters for constructor

by williamcharles (Novice)
on May 16, 2019 at 15:27 UTC ( [id://11100100]=note: print w/replies, xml ) Need Help??


in reply to Re: Moo different parameters for constructor
in thread Moo different parameters for constructor

Thanks for the tip. Also, How can we validate constructor args?
  • Comment on Re^2: Moo different parameters for constructor

Replies are listed 'Best First'.
Re^3: Moo different parameters for constructor
by haukex (Archbishop) on May 16, 2019 at 15:36 UTC
    Also, How can we validate constructor args?

    There's several different ways to do this. The code I showed already uses Type-Tiny, see its documentation on how to use it for tighter constraints, and see the documentation for isa in Moo. I also mentioned MooX::StrictConstructor above.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found