X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lib%2FPerl%2FTidy%2FHtmlWriter.pm;h=eba6335a47cfead7ab7a0090c1880a508f737689;hb=880633cc084e9d787eb9f760d3851c5d660db17c;hp=0d82978ba7039cd21fed041a38f9228d013e67cf;hpb=657098da8da16dccd551721ffc180956d8aab7fc;p=perltidy.git diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 0d82978..eba6335 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20190601'; +our $VERSION = '20220217'; use File::Basename; @@ -38,11 +38,50 @@ BEGIN { } } +sub AUTOLOAD { + + # Catch any undefined sub calls so that we are sure to get + # some diagnostic information. This sub should never be called + # except for a programming error. + our $AUTOLOAD; + return if ( $AUTOLOAD =~ /\bDESTROY$/ ); + my ( $pkg, $fname, $lno ) = caller(); + my $my_package = __PACKAGE__; + print STDERR < undef, + html_file => undef, + extension => undef, + html_toc_extension => undef, + html_src_extension => undef, + ); + my %args = ( %defaults, @args ); + + my $input_file = $args{input_file}; + my $html_file = $args{html_file}; + my $extension = $args{extension}; + my $html_toc_extension = $args{html_toc_extension}; + my $html_src_extension = $args{html_src_extension}; my $html_file_opened = 0; my $html_fh; @@ -187,6 +226,7 @@ sub add_toc_item { $html_toc_fh->print("\n\n"); ${$rin_toc_package} = ""; } + return; }; my $start_package_list = sub { @@ -197,6 +237,7 @@ sub add_toc_item {