X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fcheckpods.PL;h=692a706fc51df5bf10506116019689b90e0bba4f;hb=6aa71d6ea27a640886ba2dcf7250d1be73560df8;hp=0cac62325e5778fbed02b64a28a289814774dbdf;hpb=2862e1b7fc64694815faab42fc50219a12dae9f0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/checkpods.PL b/pod/checkpods.PL index 0cac623..692a706 100644 --- a/pod/checkpods.PL +++ b/pod/checkpods.PL @@ -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;