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

Re(4): RFC - Parameter Objects

by Ovid (Cardinal)
on May 14, 2003 at 21:32 UTC ( [id://258262]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: RFC - Parameter Objects
in thread RFC - Parameter Objects

You are right, but I think it might be solved. In a response to Corion, I wrote:

Perhaps the contructor could be modified. The current hashref would fall under a key named "params" and a different key named "groups" would list group validations. Then, as soon as an accessor is called, the "group" validations would be checked. This would eliminate the order dependence. Workable?

When an accessor is called, the parameters are validated. If a value is never set, we can still validate it when the accessor is called. This is still not foolproof, but I think it's a reasonable scheme. Let me know if you think there are problems with this.

Cheers,
Ovid

New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-06-22 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.