diff options
author | James E Keenan <jkeenan@cpan.org> | 2021-03-18 18:57:02 +0000 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2021-08-23 01:47:47 +0000 |
commit | 0e74e9b028173e63b960835f7ba58e379dd18e0e (patch) | |
tree | 32c48abcbb14675aea56846a70768ec61d6920b1 /ext/Pod-Html | |
parent | 06dda0b0ccbe2aec353c1a8c1bd1ea3adb085b4a (diff) | |
download | perl-0e74e9b028173e63b960835f7ba58e379dd18e0e.tar.gz |
Move $output into the object
Correct dropped variable declaration.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r-- | ext/Pod-Html/lib/Pod/Html.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm index 6a4410e500..87f2b1eff2 100644 --- a/ext/Pod-Html/lib/Pod/Html.pm +++ b/ext/Pod-Html/lib/Pod/Html.pm @@ -273,7 +273,6 @@ sub pod2html { # set options for the HTML generator my $parser = Pod::Simple::XHTML::LocalPodLinks->new(); - my $output; $parser->codes_in_verbatim(0); $parser->anchor_items(1); # the old Pod::Html always did $parser->backlink($self->{Backlink}); # linkify =head1 directives @@ -282,14 +281,14 @@ sub pod2html { $parser->htmlfileurl($self->{Htmlfileurl}); $parser->htmlroot($self->{Htmlroot}); $parser->index($self->{Doindex}); - $parser->output_string(\$output); # written to file later + $parser->output_string(\$self->{output}); # written to file later $parser->pages(\%Pages); $parser->quiet($self->{Quiet}); $parser->verbose($self->{Verbose}); $parser = $self->refine_parser($parser); $self->feed_tree_to_parser($parser, $podtree); - $self->write_file($output); + $self->write_file(); } sub init_globals { @@ -631,7 +630,7 @@ sub feed_tree_to_parser { } sub write_file { - my ($self, $output) = @_; + my $self = shift; $self->{Htmlfile} = "-" unless $self->{Htmlfile}; # stdout my $fhout; if($self->{Htmlfile} and $self->{Htmlfile} ne '-') { @@ -641,7 +640,7 @@ sub write_file { open $fhout, ">-"; } binmode $fhout, ":utf8"; - print $fhout $output; + print $fhout $self->{output}; close $fhout or die "Failed to close $self->{Htmlfile}: $!"; chmod 0644, $self->{Htmlfile} unless $self->{Htmlfile} eq '-'; } |