From: Nicholas Clark Date: Mon, 15 May 2006 13:57:25 +0000 (+0000) Subject: Simplify the implementation in ExtUtils::Packlist::read. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2670f2fb63e9d801bb95741ca4b37440856f6dc9;p=p5sagit%2Fp5-mst-13.2.git Simplify the implementation in ExtUtils::Packlist::read. p4raw-id: //depot/perl@28196 --- diff --git a/lib/ExtUtils/Packlist.pm b/lib/ExtUtils/Packlist.pm index 6fdf184..abb3a9d 100644 --- a/lib/ExtUtils/Packlist.pm +++ b/lib/ExtUtils/Packlist.pm @@ -3,8 +3,9 @@ package ExtUtils::Packlist; use 5.00503; use strict; use Carp qw(); +use Config; use vars qw($VERSION); -$VERSION = '1.38'; +$VERSION = '1.39_01'; $VERSION = eval $VERSION; # Used for generating filehandle globs. IO::File might not be available! @@ -101,27 +102,14 @@ my ($line); while (defined($line = <$fh>)) { chomp $line; - my ($key, @kvs) = $line; + my ($key, $data) = $line; if ($key =~ /^(.*?)( \w+=.*)$/) { $key = $1; - @kvs = split(' ', $2); + $data = { map { split('=', $_) } split(' ', $2)}; } $key =~ s!/\./!/!g; # Some .packlists have spurious '/./' bits in the paths - if (! @kvs) - { - $self->{data}->{$key} = undef; - } - else - { - my ($data) = {}; - foreach my $kv (@kvs) - { - my ($k, $v) = split('=', $kv); - $data->{$k} = $v; - } - $self->{data}->{$key} = $data; - } + $self->{data}->{$key} = $data; } close($fh); }