summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-21 11:34:30 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-21 11:34:30 +0000
commit644741fd207d1faadeb06a76dbea0c6d069c568b (patch)
tree0d67434049a774368a023d92cd1cc315b3bd8ec8 /ext
parentc826f41b69925b8dedc613995e7dbb5bc467e6a4 (diff)
downloadperl-644741fd207d1faadeb06a76dbea0c6d069c568b.tar.gz
Deparse each @array and friends.
p4raw-id: //depot/perl@32687
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B/Deparse.pm5
-rw-r--r--ext/B/t/deparse.t12
2 files changed, 15 insertions, 2 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index 77ae15f581..9c4f4c3a01 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -21,7 +21,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE
PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE');
-$VERSION = 0.83;
+$VERSION = 0.84;
use strict;
use vars qw/$AUTOLOAD/;
use warnings ();
@@ -1624,6 +1624,9 @@ sub pp_chr { maybe_targmy(@_, \&unop, "chr") }
sub pp_each { unop(@_, "each") }
sub pp_values { unop(@_, "values") }
sub pp_keys { unop(@_, "keys") }
+sub pp_aeach { unop(@_, "each") }
+sub pp_avalues { unop(@_, "values") }
+sub pp_akeys { unop(@_, "keys") }
sub pp_pop { unop(@_, "pop") }
sub pp_shift { unop(@_, "shift") }
diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t
index 8ba8cee095..8763b4a59e 100644
--- a/ext/B/t/deparse.t
+++ b/ext/B/t/deparse.t
@@ -27,7 +27,7 @@ BEGIN {
require feature;
feature->import(':5.10');
}
-use Test::More tests => 54;
+use Test::More tests => 56;
use B::Deparse;
my $deparse = B::Deparse->new();
@@ -384,3 +384,13 @@ $a = sub {
return $x++;
}
;
+####
+# SKIP ?$] < 5.011 && 'each @array not implemented on this Perl version'
+# 49 each @array;
+each @ARGV;
+each @$a;
+####
+# SKIP ?$] < 5.011 && 'each @array not implemented on this Perl version'
+# 50 keys @array; values @array
+keys @$a if keys @ARGV;
+values @ARGV if values @$a;