summaryrefslogtreecommitdiff
path: root/pod/perlboot.pod
diff options
context:
space:
mode:
authorMichael Witten <mfwitten@gmail.com>2009-04-07 14:59:22 -0500
committerYves Orton <demerphq@gmail.com>2009-04-07 23:41:31 +0200
commit2ee409f9fc5c2201b0d49c1f13f3c2ae8804305b (patch)
tree587cf4fabb75d3252e962fe947a5783ec8223b55 /pod/perlboot.pod
parent4dfdcbc906383f5658d74d23b9341b7a5cb21891 (diff)
downloadperl-2ee409f9fc5c2201b0d49c1f13f3c2ae8804305b.tar.gz
Docs: Make the "use base" purpose more obvious
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Diffstat (limited to 'pod/perlboot.pod')
-rw-r--r--pod/perlboot.pod14
1 files changed, 4 insertions, 10 deletions
diff --git a/pod/perlboot.pod b/pod/perlboot.pod
index 64ad4e7cae..afe9837986 100644
--- a/pod/perlboot.pod
+++ b/pod/perlboot.pod
@@ -264,20 +264,14 @@ Or allow it as an implicitly named package variable:
use vars qw(@ISA);
@ISA = qw(Animal);
-If you're bringing in the class from outside, via an object-oriented
-module, you change:
-
- package Cow;
- use Animal;
- use vars qw(@ISA);
- @ISA = qw(Animal);
-
-into just:
+If the C<Animal> class comes from another (object-oriented) module, then
+just employ C<use base> to specify that C<Animal> should serve as the basis
+for the C<Cow> class:
package Cow;
use base qw(Animal);
-And that's pretty darn compact.
+Now that's pretty darn simple!
=head2 Overriding the methods