summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-09 06:30:03 -0800
committerRicardo Signes <rjbs@cpan.org>2014-01-14 09:33:01 -0500
commit0953b66bdb6b9cd4da676d1614e87fe081b20a9c (patch)
tree965f4ed80afcc8a81700f274392e1e8cf12a2a5f
parentef40a5dd8380ca9dcbf40ccf6f706a4b5e25bbc6 (diff)
downloadperl-0953b66bdb6b9cd4da676d1614e87fe081b20a9c.tar.gz
Make key/push $scalar experimental
We need a better name for the experimental category, but I have not thought of one, even after sleeping on it.
-rwxr-xr-xPorting/corelist.pl1
-rw-r--r--lib/B/Deparse.t1
-rw-r--r--lib/warnings.pm31
-rw-r--r--op.c17
-rw-r--r--pod/perldiag.pod68
-rw-r--r--pod/perllexwarn.pod2
-rwxr-xr-xregen/regcharclass.pl1
-rw-r--r--regen/warnings.pl2
-rw-r--r--t/lib/warnings/op62
-rw-r--r--t/op/kvaslice.t2
-rw-r--r--t/op/kvhslice.t2
-rw-r--r--t/op/push.t2
-rw-r--r--t/op/smartkve.t2
-rw-r--r--t/op/splice.t2
-rw-r--r--t/op/tie_fetch_count.t10
-rw-r--r--t/op/unshift.t1
-rw-r--r--warnings.h5
17 files changed, 179 insertions, 32 deletions
diff --git a/Porting/corelist.pl b/Porting/corelist.pl
index 5d302d3290..8ecb86bfa7 100755
--- a/Porting/corelist.pl
+++ b/Porting/corelist.pl
@@ -10,6 +10,7 @@
use autodie;
use strict;
use warnings;
+no warnings 'experimental::aggref';
use File::Find;
use ExtUtils::MM_Unix;
use version;
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index 194d2a17c4..904251a93b 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -10,6 +10,7 @@ BEGIN {
}
use warnings;
+no warnings 'experimental::aggref';
use strict;
use Test::More;
diff --git a/lib/warnings.pm b/lib/warnings.pm
index 440bfdda3e..05f23e67eb 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -236,12 +236,13 @@ our %Offsets = (
# Warnings Categories added in Perl 5.019
- 'experimental::postderef'=> 112,
- 'syscalls' => 114,
+ 'experimental::aggref'=> 112,
+ 'experimental::postderef'=> 114,
+ 'syscalls' => 116,
);
our %Bits = (
- 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05", # [0..57]
+ 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15", # [0..58]
'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [29]
'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [30]
'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
@@ -251,10 +252,11 @@ our %Bits = (
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
- 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x01", # [51..56]
+ 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x05", # [51..57]
+ 'experimental::aggref'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [56]
'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [52]
'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [53]
- 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [56]
+ 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [57]
'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [54]
'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [55]
'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
@@ -262,7 +264,7 @@ our %Bits = (
'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [46]
'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
- 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [5..11,57]
+ 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [5..11,58]
'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
@@ -290,7 +292,7 @@ our %Bits = (
'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [50]
'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00", # [28..38,47]
- 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [57]
+ 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [58]
'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [39]
'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [40]
'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [41]
@@ -302,7 +304,7 @@ our %Bits = (
);
our %DeadBits = (
- 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x0a", # [0..57]
+ 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x2a", # [0..58]
'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [29]
'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [30]
'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
@@ -312,10 +314,11 @@ our %DeadBits = (
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
- 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\x02", # [51..56]
+ 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\x0a", # [51..57]
+ 'experimental::aggref'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [56]
'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [52]
'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [53]
- 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [56]
+ 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [57]
'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [54]
'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [55]
'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
@@ -323,7 +326,7 @@ our %DeadBits = (
'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [46]
'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
- 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [5..11,57]
+ 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [5..11,58]
'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
@@ -351,7 +354,7 @@ our %DeadBits = (
'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [50]
'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00", # [28..38,47]
- 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [57]
+ 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [58]
'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [39]
'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [40]
'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [41]
@@ -363,8 +366,8 @@ our %DeadBits = (
);
$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
-$DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x01", # [2,52,53,56,54,55,4,22,23,25]
-$LAST_BIT = 116 ;
+$DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x05", # [2,56,52,53,57,54,55,4,22,23,25]
+$LAST_BIT = 118 ;
$BYTES = 15 ;
$All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
diff --git a/op.c b/op.c
index 6cf532f941..c8bfca43df 100644
--- a/op.c
+++ b/op.c
@@ -9105,7 +9105,14 @@ Perl_ck_fun(pTHX_ OP *o)
/* Defer checks to run-time if we have a scalar arg */
if (kid->op_type == OP_RV2AV || kid->op_type == OP_PADAV)
op_lvalue(kid, type);
- else scalar(kid);
+ else {
+ scalar(kid);
+ /* diag_listed_as: push on reference is experimental */
+ Perl_ck_warner_d(aTHX_
+ packWARN(WARN_EXPERIMENTAL__AGGREF),
+ "%s on reference is experimental",
+ PL_op_desc[type]);
+ }
break;
case OA_HVREF:
if (kid->op_type == OP_CONST &&
@@ -10944,7 +10951,13 @@ Perl_ck_each(pTHX_ OP *o)
}
}
/* if treating as a reference, defer additional checks to runtime */
- return o->op_type == ref_type ? o : ck_fun(o);
+ if (o->op_type == ref_type) {
+ /* diag_listed_as: keys on reference is experimental */
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__AGGREF),
+ "%s is experimental", PL_op_desc[ref_type]);
+ return o;
+ }
+ return ck_fun(o);
}
OP *
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index d527486dfb..edeef1502a 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1761,6 +1761,14 @@ already been freed.
(W unpack) You have applied the same modifier more than once after a
type in a pack template. See L<perlfunc/pack>.
+=item each on reference is experimental
+
+(S experimental::aggref) C<each> with a scalar argument is experimental and
+may change or be removed in a future Perl version. If you want to take
+the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item elseif should be elsif
(S syntax) There is no keyword "elseif" in Perl because Larry thinks
@@ -2693,6 +2701,14 @@ line. See L<perlrun> for more details.
(P) The regular expression parser is confused.
+=item keys on reference is experimental
+
+(S experimental::aggref) C<keys> with a scalar argument is experimental and
+may change or be removed in a future Perl version. If you want to take
+the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item Label not found for "last %s"
(F) You named a loop to break out of, but you're not currently in a loop
@@ -4180,7 +4196,15 @@ fine from VMS' perspective, it's probably not what you intended.
(F) The unpack format P must have an explicit size, not "*".
-=item POSIX class [:%s:] unknown in regex; marked by S<<-- HERE> in m/%s/
+=item pop on reference is experimental
+
+(S experimental::aggref) C<pop> with a scalar argument is experimental and
+may change or be removed in a future Perl version. If you want to take
+the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
+=item POSIX class [:%s:] unknown in regex; marked by S<< <-- HERE in m/%s/ >>
(F) The class in the character class [: :] syntax is unknown. The S<<-- HERE>
shows whereabouts in the regular expression the problem was discovered.
@@ -4438,7 +4462,15 @@ is true for "LATIN SMALL LETTER Y WITH DIAERESIS", but since the upper
case of that character is not in Latin1, in that locale it doesn't
change when upper cased.
-=item Quantifier follows nothing in regex; marked by S<<-- HERE> in m/%s/
+=item push on reference is experimental
+
+(S experimental::aggref) C<push> with a scalar argument is experimental and
+may change or be removed in a future Perl version. If you want to take
+the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
+=item Quantifier follows nothing in regex; marked by S<< <-- HERE in m/%s/ >>
(F) You started a regular expression with a quantifier. Backslash it if
you meant it literally. The S<<-- HERE> shows whereabouts in the regular
@@ -4894,6 +4926,14 @@ didn't think so.
forget to check the return value of your socket() call? See
L<perlfunc/setsockopt>.
+=item shift on reference is experimental
+
+(S experimental::aggref) C<shift> with a scalar argument is experimental
+and may change or be removed in a future Perl version. If you want to
+take the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item shm%s not implemented
(F) You don't have System V shared memory IPC on your system.
@@ -4978,6 +5018,14 @@ end of the array, rather than past it. If this isn't what you want,
try explicitly pre-extending the array by assigning $#array = $offset.
See L<perlfunc/splice>.
+=item splice on reference is experimental
+
+(S experimental::aggref) C<splice> with a scalar argument is experimental
+and may change or be removed in a future Perl version. If you want to
+take the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item Split loop
(P) The split was looping infinitely. (Obviously, a split shouldn't
@@ -5795,6 +5843,14 @@ on your system.
think you didn't do that, check the #! line to see if it's supplying the
bad switch on your behalf.)
+=item unshift on reference is experimental
+
+(S experimental::aggref) C<unshift> with a scalar argument is experimental
+and may change or be removed in a future Perl version. If you want to
+take the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item Unsuccessful %s on filename containing newline
(W newline) A file operation was attempted on a filename, and that
@@ -6340,6 +6396,14 @@ C<defined> operator.
longer than 1024 characters. The return value has been truncated to
1024 characters.
+=item values on reference is experimental
+
+(S experimental::aggref) C<values> with a scalar argument is experimental
+and may change or be removed in a future Perl version. If you want to
+take the risk of using this feature, simply disable this warning:
+
+ no warnings "experimental::aggref";
+
=item Variable "%s" is not available
(W closure) During compilation, an inner named subroutine or eval is
diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod
index 0c849a433b..882c50254c 100644
--- a/pod/perllexwarn.pod
+++ b/pod/perllexwarn.pod
@@ -229,6 +229,8 @@ will be lost.
|
+- experimental --+
| |
+ | +- experimental::aggref
+ | |
| +- experimental::lexical_subs
| |
| +- experimental::lexical_topic
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index bb290d5496..13ac0b4ed4 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -4,6 +4,7 @@ use strict;
use 5.008;
use warnings;
use warnings FATAL => 'all';
+no warnings 'experimental::aggref';
use Text::Wrap qw(wrap);
use Data::Dumper;
$Data::Dumper::Useqq= 1;
diff --git a/regen/warnings.pl b/regen/warnings.pl
index e8dcf4ab06..a7bf9ab7b7 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -99,6 +99,8 @@ my $tree = {
[ 5.017, DEFAULT_ON ],
'experimental::postderef' =>
[ 5.019, DEFAULT_ON ],
+ 'experimental::aggref' =>
+ [ 5.019, DEFAULT_ON ],
}],
#'default' => [ 5.008, DEFAULT_ON ],
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 373f916c8c..affb1cd04c 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -64,6 +64,12 @@
Array @%s missing the @ in argument %d of %s()
push fred ;
+ push on reference is experimental [ck_fun]
+ pop on reference is experimental
+ shift on reference is experimental
+ unshift on reference is experimental
+ splice on reference is experimental
+
Hash %%%s missing the %% in argument %d of %s()
keys joe ;
@@ -84,6 +90,10 @@
$[ used in comparison (did you mean $] ?)
+ each on reference is experimental [ck_each]
+ keys on reference is experimental
+ values on reference is experimental
+
length() used on @array (did you mean "scalar(@array)"?)
length() used on %hash (did you mean "scalar(keys %hash)"?)
@@ -242,9 +252,12 @@ use constant phoo => 1..3;
@h{localtime 0};
@h{gmtime 0};
@h{eval ""};
-@h{each $foo} if 0;
-@h{keys $foo} if 0;
-@h{values $foo} if 0;
+{
+ no warnings 'experimental::aggref';
+ @h{each $foo} if 0;
+ @h{keys $foo} if 0;
+ @h{values $foo} if 0;
+}
# arrays
@h[qw"a b c"] = 1..3;
@@ -288,9 +301,12 @@ use constant phoo => 1..3;
@h[localtime 0];
@h[gmtime 0];
@h[eval ""];
-@h[each $foo] if 0;
-@h[keys $foo] if 0;
-@h[values $foo] if 0;
+{
+ no warnings 'experimental::aggref';
+ @h[each $foo] if 0;
+ @h[keys $foo] if 0;
+ @h[values $foo] if 0;
+}
EXPECT
########
# op.c
@@ -1017,6 +1033,26 @@ EXPECT
Array @FRED missing the @ in argument 1 of push() at - line 2.
########
# op.c
+$fred = [];
+push $fred;
+pop $fred;
+shift $fred;
+unshift $fred;
+splice $fred;
+no warnings 'deprecated' ;
+push $fred;
+pop $fred;
+shift $fred;
+unshift $fred;
+splice $fred;
+EXPECT
+push on reference is experimental at - line 3.
+pop on reference is experimental at - line 4.
+shift on reference is experimental at - line 5.
+unshift on reference is experimental at - line 6.
+splice on reference is experimental at - line 7.
+########
+# op.c
@a = keys FRED ;
no warnings 'deprecated' ;
@a = keys FRED ;
@@ -1340,6 +1376,20 @@ $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
$[ used in numeric le (<=) (did you mean $] ?) at - line 19.
$[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
########
+# op.c [Perl_ck_each]
+$fred = {};
+keys $fred;
+values $fred;
+each $fred;
+no warnings 'deprecated' ;
+keys $fred;
+values $fred;
+each $fred;
+EXPECT
+keys on reference is experimental at - line 3.
+values on reference is experimental at - line 4.
+each on reference is experimental at - line 5.
+########
# op.c [Perl_ck_length]
use warnings 'syntax' ;
length(@a);
diff --git a/t/op/kvaslice.t b/t/op/kvaslice.t
index 0738a17a87..3e573adbab 100644
--- a/t/op/kvaslice.t
+++ b/t/op/kvaslice.t
@@ -182,7 +182,7 @@ plan tests => 40;
{
my %h = 'a'..'b';
my @i = \%h;
- no warnings 'syntax';
+ no warnings 'syntax', 'experimental::aggref';
my ($k,$v) = each %i[0];
is $k, 'a', 'key returned by each %array[ix]';
is $v, 'b', 'val returned by each %array[ix]';
diff --git a/t/op/kvhslice.t b/t/op/kvhslice.t
index 8acd0ab81c..7ee6d7d098 100644
--- a/t/op/kvhslice.t
+++ b/t/op/kvhslice.t
@@ -195,7 +195,7 @@ plan tests => 44;
{
my %h = 'a'..'b';
my %i = (foo => \%h);
- no warnings 'syntax';
+ no warnings 'syntax', 'experimental::aggref';
my ($k,$v) = each %i{foo=>};
is $k, 'a', 'key returned by each %hash{key}';
is $v, 'b', 'val returned by each %hash{key}';
diff --git a/t/op/push.t b/t/op/push.t
index a85ffa83a9..1407615f76 100644
--- a/t/op/push.t
+++ b/t/op/push.t
@@ -41,6 +41,8 @@ is( join(':',@x), '1:2:3:1:2:3:4:3', 'push intuiting @ on array');
}
is( join(':',@x), '1:2:3:1:2:3:4', 'pop intuiting @ on array');
+no warnings 'experimental::aggref';
+
# test for push/pop on arrayref
push(\@x,5);
is( join(':',@x), '1:2:3:1:2:3:4:5', 'push arrayref');
diff --git a/t/op/smartkve.t b/t/op/smartkve.t
index 3cd5b492d0..c18dddd0ec 100644
--- a/t/op/smartkve.t
+++ b/t/op/smartkve.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
use warnings;
-no warnings 'deprecated';
+no warnings 'deprecated', 'experimental::aggref';
use vars qw($data $array $values $hash $errpat);
plan 'no_plan';
diff --git a/t/op/splice.t b/t/op/splice.t
index 510d4cbd8a..45cd7f8e69 100644
--- a/t/op/splice.t
+++ b/t/op/splice.t
@@ -89,7 +89,7 @@ splice @Foo::ISA, 0, 0, 'Bar';
ok( !oo->isa('Bar'), 'splice @ISA and make Foo a Bar');
# Test undef first arg
-eval { splice( $new_arrayref, 0, 0, 1, 2, 3 ) };
+eval { no warnings 'experimental';splice( $new_arrayref, 0, 0, 1, 2, 3 ) };
like($@, qr/Not an ARRAY/, 'undefined first argument to splice');
# Test arrays with nonexistent elements (crashes when it fails)
diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t
index c3ed030cfd..846c9cf807 100644
--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -169,10 +169,16 @@ tie my $var1 => 'main', \1;
$dummy = $$var1 ; check_count '${}';
tie my $var2 => 'main', [];
$dummy = @$var2 ; check_count '@{}';
-$dummy = shift $var2 ; check_count 'shift arrayref';
+{
+ no warnings 'experimental::aggref';
+ $dummy = shift $var2 ; check_count 'shift arrayref';
+}
tie my $var3 => 'main', {};
$dummy = %$var3 ; check_count '%{}';
-$dummy = keys $var3 ; check_count 'keys hashref';
+{
+ no warnings 'experimental::aggref';
+ $dummy = keys $var3 ; check_count 'keys hashref';
+}
{
no strict 'refs';
tie my $var4 => 'main', *];
diff --git a/t/op/unshift.t b/t/op/unshift.t
index 475b3e7011..6f3bb23e3b 100644
--- a/t/op/unshift.t
+++ b/t/op/unshift.t
@@ -9,6 +9,7 @@ plan(36);
@array = (1, 2, 3);
$aref = [1, 2, 3];
+no warnings 'experimental::aggref';
{
no warnings 'syntax';
$count3 = unshift (@array);
diff --git a/warnings.h b/warnings.h
index 929b94faf7..1518e828c8 100644
--- a/warnings.h
+++ b/warnings.h
@@ -97,8 +97,9 @@
/* Warnings Categories added in Perl 5.019 */
-#define WARN_EXPERIMENTAL__POSTDEREF 56
-#define WARN_SYSCALLS 57
+#define WARN_EXPERIMENTAL__AGGREF 56
+#define WARN_EXPERIMENTAL__POSTDEREF 57
+#define WARN_SYSCALLS 58
#define WARNsize 15
#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"