-
Notifications
You must be signed in to change notification settings - Fork 574
Doc change for 'our' implies large incompatible change #13938
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
Comments
From john.l.henning@gmail.comCreated by john.l.henning@gmail.comFor the 'our' function, a doc change in 5.18 seems to imply a "old" = prior to 5.18 old: "does not necessarily create a variable" old: "declares a global variable that" From the above, this reader wondered if the text boiled down to: - 5.16 'our' _might_ create your simple global variable In particular, I wondered whether this case would change: $ perl --version $ perl -e 'use strict; use warnings; our $a1; my $a1;' and conversely: $ perl -e 'use strict; use warnings; my $a1; our $a1;' If the 5.18 'our' never creates actual storage space for Yet, it is clearly not required nor wanted in 5.12. Surely 5.18 would not have made such an incompatible change Therefore, I suggest that the documentation change has It appears that the change was made at or near to here, as part
I suspect that David has improved an important case, but has - Simple-hearted programmer [For completeness: alternatives considered: Perl Info
|
From @ikegamiOn Wed, Jun 18, 2014 at 11:04 PM, John Henning <perlbug-followup@perl.org>
C<our> wasn't changed. The documentation was simply updated to reflect what $ perl -E'package ModA; our $x; package ModB; $ModA::x = 123; $ModB::x = Therefore, I suggest that the documentation change has
Don't let an C<our> declaration span a package decleration, or use C<< use |
The RT System itself - Status changed from 'new' to 'open' |
From @xdgOn Wed, Jun 18, 2014 at 11:04 PM, John Henning
Looking at my patch, I think the confusion may be that I removed the Would this amendment be helpful? → David -- |
From john.l.henning@gmail.com
Hi David, thank you for responding to my request. You suggest: ... allocate storage for that name within the current scope. (Package How about making the parenthetical into a full explanation of what is See below Package variable storage is allocated on demand. Therefore, 1 use strict; then the effect is: |
From @xdgOn Thu, Jun 19, 2014 at 11:57 AM, John Henning <john.l.henning@gmail.com> wrote:
My view is that we probably shouldn't be talking about storage at all -- |
From @ikegamiOn Thu, Jun 19, 2014 at 11:57 AM, John Henning <john.l.henning@gmail.com>
You can't create an alias to a variable that doesn't exist. Storage is use strict; 1: 0 I agree with David Golden. This should not be in the docs. |
@xdg - Status changed from 'open' to 'pending release' |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22. 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#122132 (status was 'resolved')
Searchable as RT122132$
The text was updated successfully, but these errors were encountered: