From: Roderick Schertler Date: Sat, 22 Feb 1997 18:03:08 +0000 (-0500) Subject: Pod::Text fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78ff9ed7ca04a40a5e1e46df66c3ac95d7315e7d;p=p5sagit%2Fp5-mst-13.2.git Pod::Text fixes Here are some bug fixes for Pod::Text. Is it a bug that text given to =for and =begin doesn't get indented? It seems like a bug to me, but I imagine one could argue the other way so I wanted to test opinion before fixing it. p5p-msgid: <350.856634588@eeyore.ibcinc.com> --- diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index 2ecaebe..d40abbc 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -48,7 +48,7 @@ require Exporter; @EXPORT = qw(pod2text); use vars qw($VERSION); -$VERSION = "1.0201"; +$VERSION = "1.0202"; $termcap=0; @@ -101,7 +101,7 @@ POD_DIRECTIVE: while () { $begun = ""; } elsif ($begun eq "text") { - print STDOUT $_; + print OUTPUT $_; } next; } @@ -119,7 +119,7 @@ POD_DIRECTIVE: while () { if (/^=for\s+(\S+)\s*(.*)/s) { if ($1 eq "text") { - print STDOUT $2,""; + print OUTPUT $2,""; } else { # ignore unknown for } @@ -128,7 +128,7 @@ POD_DIRECTIVE: while () { elsif (/^=begin\s+(\S+)\s*(.*)/s) { $begun = $1; if ($1 eq "text") { - print STDOUT $2.""; + print OUTPUT $2.""; } next; } @@ -211,6 +211,9 @@ sub prepare_for_output { if ($Cmd eq 'cut') { $cutting = 1; } + elsif ($Cmd eq 'pod') { + $cutting = 0; + } elsif ($Cmd eq 'head1') { makespace(); print OUTPUT;