New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Add @ISA to perlvar #15686
Comments
From @haukexDear P5Porters, I noticed that @ISA isn't documented in perlvar, so I copied & pasted some Thanks, Regards, |
From @haukex0001-Document-ISA-in-perlvar.patchFrom e0545836bd76c41ea743ecd08f2f275b212720f6 Mon Sep 17 00:00:00 2001
From: Hauke D <haukex@zero-g.net>
Date: Wed, 26 Oct 2016 10:52:12 +0200
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 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 35351b7..403a1e3 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -540,6 +540,20 @@ 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>, but it is recommended to use
+L<parent> to declare parent classes. This pragma will take care of setting
+C<@ISA> and will also load the parent classes and make sure that the
+package doesn't inherit from itself.
+
=item $^M
X<$^M>
--
2.10.1
|
From @tonycozOn Wed Oct 26 02:07:15 2016, haukex@zero-g.net wrote:
+It is possible to manually set C<@ISA>, but it is recommended to use Is it recommended? This pragma will take care of setting Setting @ISA directly also checks for recursive inheritence: $ ./perl -e 'package Foo; our @ISA = "Bar"; package Bar; our @ISA = "Foo";' Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sun Oct 30 17:51:24 2016, tonyc wrote:
By some and not by others.
I think it would be better for perlvar to begin by explaining what the variable does and what it is for, and *then* also mention that parent.pm *can* be used to set it. -- Father Chrysostomos |
From @haukexHi, On 31.10.2016 06:39, Father Chrysostomos via RT wrote:
I copied that wording from perlobj: "It is possible to manually set But that could certainly be toned down, see updated text below.
Having never set @ISA manually (at least as far back as I can
The patch begins with an explanation of the variable's purpose which I Updated suggestion: ---8<--- It is possible to manually set C<@ISA>, or you can use L<parent> to load If that's better I'd be happy to produce a new patch. Thanks, Regards, |
From @cpansproutOn Mon Oct 31 04:02:09 2016, haukex@zero-g.net wrote:
I do think that is better. Thank you. -- Father Chrysostomos |
From @haukexOn Mon, 31 Oct 2016, Father Chrysostomos via RT wrote:
Thank you, new patch attached! Regards, |
From @haukex0002-Document-ISA-in-perlvar.patchFrom 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
|
From @ap* Hauke D <haukex@zero-g.net> [2016-11-01 13:12]:
I applied this as bf38d94 with a slight Thank you. I’m surprised nobody ever noticed this oversight before. Regards, |
@iabyn - Status changed from 'open' to 'pending release' |
From @haukexOn 07.11.2016 09:07, Aristotle Pagaltzis via RT wrote:
Thank you, Aristotle, Father Chrysostomos, and Tony! Regards, |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#129967 (status was 'resolved')
Searchable as RT129967$
The text was updated successfully, but these errors were encountered: