Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Method Chaining and Accessors

by f00li5h (Chaplain)
on Apr 05, 2007 at 02:03 UTC ( [id://608398]=note: print w/replies, xml ) Need Help??


in reply to Re: Method Chaining and Accessors
in thread Method Chaining and Accessors

The client can pass silly things in the hash, and the writer of the class has to validate that all required keys are present, and extranious ones cause warnings. unless you have Class::Std do it all for you.

(and to be pedantic, you're not passing a hash at all)

Update I forgot to mention that I did actually agree with the "passing data to the constructor" idea.

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Replies are listed 'Best First'.
Re^3: Method Chaining and Accessors
by misterwhipple (Monk) on Apr 05, 2007 at 03:13 UTC
    Class::Std is definitely worth a look-see. It automates a lot of the messiness you (the OP) are trying to avoid.

    cat >~/.sig </dev/interesting

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found