[BUG:47:LOG] Dropped "and" in pod2man
[p5sagit/p5-mst-13.2.git] / pod / checkpods.PL
index 5265a19..ccd78ec 100644 (file)
@@ -12,11 +12,9 @@ use File::Basename qw(&basename &dirname);
 
 # This forces PL files to create target in same directory as PL file.
 # This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-       if ($Config{'osname'} eq 'VMS' or
-           $Config{'osname'} eq 'OS2');  # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
+$file .= '.com' if $^O eq 'VMS';
 
 open OUT,">$file" or die "Can't create $file: $!";
 
@@ -64,7 +62,10 @@ while (<>) {
        $exit = 1;
     }
     $last_blank = /^\s+$/;
-    close(ARGV) if eof;
+    if (eof) {
+       close(ARGV);
+       $last_blank = 0;
+    }
 }
 exit $exit
 !NO!SUBS!