diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-05-15 13:57:25 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-05-15 13:57:25 +0000 |
commit | 2670f2fb63e9d801bb95741ca4b37440856f6dc9 (patch) | |
tree | 802b3d0e2449ffe91a201ae6b72faf59d8224b40 /lib/ExtUtils | |
parent | 6885da0efe41f13f2790ee02701364daa27dd4ce (diff) | |
download | perl-2670f2fb63e9d801bb95741ca4b37440856f6dc9.tar.gz |
Simplify the implementation in ExtUtils::Packlist::read.
p4raw-id: //depot/perl@28196
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/Packlist.pm | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/ExtUtils/Packlist.pm b/lib/ExtUtils/Packlist.pm index 6fdf184851..abb3a9de68 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); } |