-
Notifications
You must be signed in to change notification settings - Fork 571
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
$_[$ref] warnings discrepancy #12591
Comments
From @cpansproutPint:perl.git-copy sprout$ ./perl -Ilib -we '() = $_[[]]' I would expect the same output from both. Flags: Site configuration information for perl 5.17.6: Configured by sprout at Sat Nov 17 23:09:15 PST 2012. Summary of my perl5 (revision 5 version 17 subversion 6) configuration: Locally applied patches: @INC for perl 5.17.6: Environment for perl 5.17.6: |
From @dcollinsnOn Sun Nov 18 14:38:27 2012, sprout wrote:
The latter is now a compile time error, since 5.19.9: Setting $/ to an ARRAY reference is forbidden at -e line 1 Some special variables still produce no warning or error, including $$, so I do not know if this is fixed. -- |
From [Unknown Contact. See original ticket]On Sun Nov 18 14:38:27 2012, sprout wrote:
The latter is now a compile time error, since 5.19.9: Setting $/ to an ARRAY reference is forbidden at -e line 1 Some special variables still produce no warning or error, including $$, so I do not know if this is fixed. -- |
From @iabynOn Tue, Sep 27, 2016 at 10:04:10AM -0700, Dan Collins via RT wrote:
The behaviour is intentional: if the index variable has get or overload Closing. -- |
@iabyn - Status changed from 'new' to 'rejected' |
From @cpansproutOn Tue, 21 Mar 2017 05:05:50 -0700, davem wrote:
The overloading check makes sense. But pp_aelem has to call get-magic anyway before it can proceed, and there is still the problem that tied variables won’t get the warning. Many people use tied variables (sometimes without realizing it) by using modules that provide tie interfaces. There is no reason not to provide the helpful warning in such cases, since it is an easy mistake to make.
Will do. -- Father Chrysostomos |
Migrated from rt.perl.org#115810 (status was 'rejected')
Searchable as RT115810$
The text was updated successfully, but these errors were encountered: