diff options
author | Aristotle Pagaltzis <pagaltzis@gmx.de> | 2016-11-07 08:51:51 +0100 |
---|---|---|
committer | Aristotle Pagaltzis <pagaltzis@gmx.de> | 2016-11-07 08:51:51 +0100 |
commit | 89040989e74937c674a9a233107902fcf1fd4e6d (patch) | |
tree | 0c900f04659a5864c39ed58c89689182a1e4c8a2 /pod/perlobj.pod | |
parent | 4e84fddd4d83cc7691f8e6768b155e338f0a7573 (diff) | |
download | perl-89040989e74937c674a9a233107902fcf1fd4e6d.tar.gz |
perlobj: do not discourage manual @ISA
Diffstat (limited to 'pod/perlobj.pod')
-rw-r--r-- | pod/perlobj.pod | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pod/perlobj.pod b/pod/perlobj.pod index fe6f8ad20b..d5d242f3a9 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -179,10 +179,12 @@ Each package contains a special array called C<@ISA>. The C<@ISA> array contains a list of that class's parent classes, if any. This array is examined when Perl does method resolution, which we will cover later. -It is possible to manually set C<@ISA>, and you may see this in older -Perl code. Much older code also uses the L<base> pragma. For new code, -we recommend that you use the L<parent> pragma to declare your parents. -This pragma will take care of setting C<@ISA>. +Calling methods from a package means it must be loaded, of course, so +you will often want to load a module and add it to C<@ISA> at the same +time. You can do so in a single step using the L<parent> pragma. +(In older code you may encounter the L<base> pragma, which is nowadays +discouraged except when you have to work with the equally discouraged +L<fields> pragma.) However the parent classes are set, the package's C<@ISA> variable will contain a list of those parents. This is simply a list of scalars, each |