This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse each @array and friends.
authorNicholas Clark <nick@ccl4.org>
Fri, 21 Dec 2007 11:34:30 +0000 (11:34 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 21 Dec 2007 11:34:30 +0000 (11:34 +0000)
p4raw-id: //depot/perl@32687

ext/B/B/Deparse.pm
ext/B/t/deparse.t

index 77ae15f..9c4f4c3 100644 (file)
@@ -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") }
 
index 8ba8cee..8763b4a 100644 (file)
@@ -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;