next;
}
-@@ -108,8 +120,20 @@
+@@ -108,8 +120,28 @@
# will be included with the name sys/systeminfo.ph so only use the
# basename of *.ph files
+
+ ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
+
++ # if the module name starts in a dot it is not a module name
++
++ ($module =~ m/^\./) && next;
++
+ # if the module ends with .pm strip it to leave only basename
++
++ ($module =~ m/\.pm$/) && ($module =~ s/\.pm//g);
++
++ # strip () from module name ( ex. Carp() )
-+ ($module =~ m/\.pm$/) && ($module =~ s!\.pm$!!g );
++ ($module =~m/\(\)$/) && ($module =~ s/\(\)//g);
$require{$module}=$version;
$line{$module}=$_;
if ("@ARGV") {
foreach (@ARGV) {
- process_file($_);
-+ if (! m=\.(so|gz|ph|pod)$=) {
++ if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod)$)=) {
+ process_file($_);
+ }
}
foreach (<>) {
- process_file($_);
-+ if (! m=\.(so|gz|ph|pod)$=) {
++ if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod)$)=) {
+ process_file($_);
+ }
}