diff options
author | Zefram <zefram@fysh.org> | 2010-05-01 18:47:58 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-08-16 14:48:23 +0200 |
commit | f175a6ef89290c8aae9bf1a2f98ab12aaa44292b (patch) | |
tree | 97675c0336a3a6bcb8aa19c4f47656a0fcdd623b /t | |
parent | e774d6049b5edab9f5afa9a304cdf25f70bd5d37 (diff) | |
download | perl-f175a6ef89290c8aae9bf1a2f98ab12aaa44292b.tar.gz |
fix [perl #74118] $[ assignment not noisy enough
Warn about list assignment to $[, as in "($[)=1", in addition to scalar
assignment such as "$[=1".
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/op | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 4264615223..962ff5879f 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -1050,13 +1050,18 @@ Deprecated use of my() in false conditional at - line 8. ######## # op.c $[ = 1; +($[) = 1; use warnings 'deprecated'; $[ = 2; +($[) = 2; no warnings 'deprecated'; $[ = 3; +($[) = 3; EXPECT Use of assignment to $[ is deprecated at - line 2. -Use of assignment to $[ is deprecated at - line 4. +Use of assignment to $[ is deprecated at - line 3. +Use of assignment to $[ is deprecated at - line 5. +Use of assignment to $[ is deprecated at - line 6. ######## # op.c use warnings 'void'; |