This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3282575
)
Mention that a method can be thought of as a verb for an object
author
Dave Rolsky
<autarch@urth.org>
Wed, 14 Sep 2011 15:39:21 +0000
(10:39 -0500)
committer
Dave Rolsky
<autarch@urth.org>
Wed, 14 Sep 2011 15:39:21 +0000
(10:39 -0500)
pod/perlootut.pod
patch
|
blob
|
blame
|
history
diff --git
a/pod/perlootut.pod
b/pod/perlootut.pod
index
e25bb77
..
f42dec7
100644
(file)
--- a/
pod/perlootut.pod
+++ b/
pod/perlootut.pod
@@
-135,7
+135,8
@@
their constructor:
You already learned that a B<method> is a subroutine that operates on
an object. You can think of a method as the things that an object can
-I<do>.
+I<do>. If an object is a noun, then methods are its verbs (save, print,
+open).
In Perl, methods are simply subroutines that live in a class's package.
Methods are always written to receive the object as their first