This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No pod in internal Net::FTP classes.
[perl5.git] / pod / checkpods.PL
index 0cac623..692a706 100644 (file)
@@ -2,6 +2,7 @@
 
 use Config;
 use File::Basename qw(&basename &dirname);
+use Cwd;
 
 # List explicitly here the variables you want Configure to
 # generate.  Metaconfig only looks for shell variables, so you
@@ -12,6 +13,7 @@ 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.
+$origdir = cwd;
 chdir dirname($0);
 $file = basename($0, '.PL');
 $file .= '.com' if $^O eq 'VMS';
@@ -62,7 +64,7 @@ print OUT <<'!NO!SUBS!';
 
 $exit = $last_unempty = 0;
 while (<>) {
-    chomp;
+    s/(\012|\015\012|\015)$//;
     if (/^=(\S+)/ && $directive{$1} && $last_unempty) {
        printf "%s: line %5d, no blank line preceeding directive =%s\n",
                $ARGV, $., $1;
@@ -80,3 +82,4 @@ exit $exit
 close OUT or die "Can't close $file: $!";
 chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
 exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
+chdir $origdir;