Fix bad generated pod for last entries in perl{var,func}
authorikegami <eric@fmdev10.(none)>
Wed, 23 Sep 2009 22:58:34 +0000 (18:58 -0400)
committerSteffen Mueller <smueller@cpan.org>
Mon, 28 Sep 2009 15:50:39 +0000 (17:50 +0200)
ext/Pod-Perldoc/lib/Pod/Perldoc.pm

index ef54796..97edc25 100644 (file)
@@ -932,6 +932,7 @@ sub search_perlvar {
             ++$inlist;
         }
         elsif (/^=back/) {
+            last if $found && !$inheader && !$inlist;
             --$inlist;
         }
         push @$pod, $_;
@@ -991,6 +992,7 @@ sub search_perlfunc {
             ++$inlist;
         }
         elsif (/^=back/) {
+            last if $found > 1 and not $inlist;
             --$inlist;
         }
         push @$pod, $_;