Don't trump versioned module dependencies with unversioned ones.

This commit is contained in:
Ville Skyttä 2010-02-13 12:02:20 +02:00 committed by Panu Matilainen
parent a50c3e9d69
commit c2b1b54500
1 changed files with 4 additions and 4 deletions

View File

@ -244,18 +244,18 @@ sub process_file {
# use base qw(Foo) dependencies # use base qw(Foo) dependencies
if ($statement eq "use" && $module eq "base") { if ($statement eq "use" && $module eq "base") {
$require{$module} = undef; $require{$module} ||= undef;
if ($version =~ /^qw\s*[(\/]\s*([^)\/]+?)\s*[)\/]/) { if ($version =~ /^qw\s*[(\/]\s*([^)\/]+?)\s*[)\/]/) {
$require{$_} = undef for split(' ', $1); $require{$_} ||= undef for split(' ', $1);
} }
elsif ($version =~ /(["'])([^"']+)\1/) { elsif ($version =~ /(["'])([^"']+)\1/) {
$require{$2} = undef; $require{$2} ||= undef;
} }
next; next;
} }
$version = undef unless $version =~ /^$modver_re$/o; $version = undef unless $version =~ /^$modver_re$/o;
$require{$module} = $version; $require{$module} ||= $version;
} }
} }