develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [perl #129967] [PATCH] Add @ISA to perlvar

Thread Previous | Thread Next
From:
Hauke D
Date:
November 1, 2016 12:07
Subject:
Re: [perl #129967] [PATCH] Add @ISA to perlvar
Message ID:
alpine.BSF.2.02.1611010800380.13560@ditthi.pair.com
From 5bb7e60b5df69020ce559627faeb84ee40aaeb3d Mon Sep 17 00:00:00 2001
From: Hauke D <haukex@zero-g.net>
Date: Tue, 1 Nov 2016 12:53:38 +0100
Subject: [PATCH] Document @ISA in perlvar

The special variable @ISA is documented in a few places, but not in
perlvar.pod, until now.
---
 pod/perlvar.pod | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 35351b7..625d525 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -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>
 
-- 
2.10.2


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About