diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm index c8a9f59df9ac..a8123b471a5e 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 '-'; }