aboutsummaryrefslogtreecommitdiffstats
path: root/perl.prov
diff options
context:
space:
mode:
Diffstat (limited to 'perl.prov')
-rwxr-xr-xperl.prov10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl.prov b/perl.prov
index db41847..7ac8c16 100755
--- a/perl.prov
+++ b/perl.prov
@@ -128,15 +128,19 @@ sub process_file {
}
# not everyone puts the package name of the file as the first
- # package name so we report all namespaces as if they were
- # provided packages (really ugly).
+ # package name so we report all namespaces except some common
+ # false positives as if they were provided packages (really ugly).
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
# some internal packages, like DB, might be temporarily redefined inside a module.
if (!($package && $1 eq 'DB')) {
$package = $1;
undef $version;
- $require{$package} = undef;
+ if ($package eq 'main') {
+ undef $package;
+ } else {
+ $require{$package}=undef;
+ }
}
}