From: Nicholas Clark Date: Wed, 31 Oct 2007 19:44:48 +0000 (+0000) Subject: Now that ExtUtils::ParseXS requires 5.006, we can replace the foreach X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa81e4d372e2e8f3f4fd6a0d5cd6c94c1165b31f;p=p5sagit%2Fp5-mst-13.2.git Now that ExtUtils::ParseXS requires 5.006, we can replace the foreach on keys and lookup in the loop with a foreach on values, as values is "now" an LVALUE iterator. p4raw-id: //depot/perl@32209 --- diff --git a/lib/ExtUtils/ParseXS.pm b/lib/ExtUtils/ParseXS.pm index fd762f8..4c519fc 100644 --- a/lib/ExtUtils/ParseXS.pm +++ b/lib/ExtUtils/ParseXS.pm @@ -18,7 +18,7 @@ my(@XSStack); # Stack of conditionals and INCLUDEs my($XSS_work_idx, $cpp_next_tmp); use vars qw($VERSION); -$VERSION = '2.18'; +$VERSION = '2.18_01'; use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re $Overload $errors $Fallback $cplusplus $hiertype $WantPrototypes $WantVersionChk $except $WantLineNumbers @@ -193,8 +193,8 @@ sub process_file { close(TYPEMAP); } - foreach my $key (keys %input_expr) { - $input_expr{$key} =~ s/;*\s+\z//; + foreach my $value (values %input_expr) { + $value =~ s/;*\s+\z//; } my ($cast, $size);