Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Modern Perl: The Book: The Draft

by Anonymous Monk
on Jul 07, 2010 at 00:54 UTC ( [id://848353]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Modern Perl: The Book: The Draft
in thread Modern Perl: The Book: The Draft

I made the mistake of not looking at the paragraph and associated code.
Of course, the mere existence of a method called name() or age() does not by itself imply the behavior of that object. A Dog object may have an age() which is an accessor such that you can discover $rodney is 8 but $lucky is 3. A Cheese object may have an age() method that lets you determine how long to stow $cheddar so that it becomes sharp; in other words, age() may be an accessor in one class but not in another:
# how old is the cat? my $years = $zeppie->age(); # store the cheese in the warehouse for six months $cheese->age();
I would lose the code and change the sentence to
A Cheese object may have an age() method that stores the cheese in the warehouse for six months; in other words, age() may be an accessor in one class but a mutator in another.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-09-10 10:32 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.