Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Class::Base uses keyword parms for constructor but then methods use positional [oop, swengr]

by princepawn (Parson)
on Nov 06, 2007 at 18:25 UTC ( #649308=perlmeditation: print w/ replies, xml ) Need Help??

I like the rigor that Class::Base places on the constructor. And I am a big fan of keyword parms. But CB does not seem to be a complete solution for oop-dev because you dont get the same parameter validation for methods.

I endorse and use Params::Validate for this purpose. What do you use to get validated keywords parms for constructor and methods for your oop-dev?


Ivan Raikov says: the first step to understanding recursion is to begin by understanding recursion.

Comment on Class::Base uses keyword parms for constructor but then methods use positional [oop, swengr]
Re: Class::Base uses keyword parms for constructor but then methods use positional [oop, swengr]
by Mutant (Priest) on Nov 07, 2007 at 11:46 UTC
    This may or may not help you, but have you looked at Moose?
        very nice addons stvn. Thing is, as a newcomer to Moose, the docs do not have MooseX in the SEE ALSO section and the series of questions under DESCRIPTION do not point to it.

        So, after casually looking over the docs, I was wondering why Mutant even pointed me to it in the first place because it seemed to only be able to do positions parms.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://649308]
Approved by grep
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2014-07-29 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls