This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In buildtoc, move the local $/ = ''; to the scope of the file it relates to.
authorNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 16:29:18 +0000 (16:29 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 17:00:46 +0000 (17:00 +0000)
pod/buildtoc

index a1acc44..a22ed2e 100644 (file)
@@ -322,8 +322,6 @@ my $OUT;
 sub output_perltoc {
   my $filename = shift;
 
-  local $/ = '';
-
   ($_= <<"EOPOD2B") =~ s/^\t//gm and $OUT .= $_;
 
        # !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
@@ -420,6 +418,8 @@ my ($inhead1, $inhead2, $initem);
 sub podset {
     my ($pod, $file) = @_;
 
+    local $/ = '';
+
     open my $fh, '<', $file or die "Can't open file '$file' for $pod: $!";
 
     while(<$fh>) {