42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
Index: scripts/perl.prov
|
|
===================================================================
|
|
--- scripts/perl.prov.orig
|
|
+++ scripts/perl.prov
|
|
@@ -127,7 +127,11 @@ sub process_file {
|
|
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
|
|
$package=$1;
|
|
undef $version;
|
|
- $require{$package}=undef;
|
|
+ if ($package eq 'main') {
|
|
+ undef $package;
|
|
+ } else {
|
|
+ $require{$package}=undef;
|
|
+ }
|
|
}
|
|
|
|
# after we found the package name take the first assignment to
|
|
@@ -158,7 +162,7 @@ sub process_file {
|
|
|
|
$version= $1;
|
|
}
|
|
- $require{$package}=$version;
|
|
+ $require{$package} ||= $version;
|
|
}
|
|
|
|
# Allow someone to have a variable that defines virtual packages
|
|
Index: scripts/perldeps.pl
|
|
===================================================================
|
|
--- scripts/perldeps.pl.orig
|
|
+++ scripts/perldeps.pl
|
|
@@ -150,6 +150,10 @@ sub add_provide {
|
|
return if(exists($self->{'provides_check'}->{$params{'-provide'}}));
|
|
|
|
#
|
|
+ # Skip some common false positives
|
|
+ return if $params{'-provide'} eq 'main';
|
|
+
|
|
+ #
|
|
# Created dependency object
|
|
my $dep = new Dependency "provide", $params{-provide};
|
|
$dep->filename($params{-filename});
|