This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlvar: document @ISA
authorHauke D <haukex@zero-g.net>
Tue, 1 Nov 2016 11:53:38 +0000 (12:53 +0100)
committerAristotle Pagaltzis <pagaltzis@gmx.de>
Mon, 7 Nov 2016 07:56:23 +0000 (08:56 +0100)
It was documented in a few other places but not in perlvar.

pod/perlvar.pod

index 467e56f..3497a5a 100644 (file)
@@ -540,6 +540,19 @@ inplace editing.
 
 Mnemonic: value of B<-i> switch.
 
+=item @ISA
+X<@ISA>
+
+Each package contains a special array called C<@ISA> which contains a list
+of that class's parent classes, if any. This array is simply a list of
+scalars, each of which is a string that corresponds to a package name. The
+array is examined when Perl does method resolution, which is covered in
+L<perlobj>.
+
+It is possible to manually set C<@ISA>, or you can use L<parent> to load
+and declare parent classes. Alternatively there is the L<base> pragma, but
+that is discouraged unless you're also using the L<fields> pragma.
+
 =item $^M
 X<$^M>