Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Object Oriented Perl - very basic guide

by Preceptor (Deacon)
on Jun 30, 2014 at 13:51 UTC ( [id://1091721]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Object Oriented Perl - very basic guide
in thread Object Oriented Perl - very basic guide

I've also had the discussion about whether you should have separate 'set' and 'get' methods, or whether having a single one is 'ok'. E.g.

my $status_code = $object -> status; $object -> status ( "new_status" );

I'm of the opinion that separating them out is good - static attributes you might think you can update in this way, because the paradigm of method calls is the same - as the method call you expect already exists, then it's only at run time you'll find that it doesn't allow changing, where if 'set_state' isn't present it's a bit more obvious.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2026-04-16 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.