From: Nicholas Clark Date: Fri, 21 Dec 2007 11:34:30 +0000 (+0000) Subject: Deparse each @array and friends. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=644741fd207d1faadeb06a76dbea0c6d069c568b;p=p5sagit%2Fp5-mst-13.2.git Deparse each @array and friends. p4raw-id: //depot/perl@32687 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 77ae15f..9c4f4c3 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 8ba8cee..8763b4a 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;