From: Steve Hancock Date: Sat, 15 Aug 2020 02:28:17 +0000 (-0700) Subject: improved fix for RT #133161, -html not working on pod X-Git-Tag: 20200822~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d4a873e477dc2f0631688b2c55989eae3114e07f;p=perltidy.git improved fix for RT #133161, -html not working on pod --- diff --git a/CHANGES.md b/CHANGES.md index 48649f32..2244371c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## 2020 06 19.02 + - Fix issue RT #133161, perltidy -html was not working on pod + - Fix issue git #33, allow control of space after '->' - Vertical alignment has been improved. diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 836f0cab..bf4a82d1 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -30,10 +30,10 @@ use vars qw{ #{ eval "use HTML::Entities"; $missing_html_entities = $@; } BEGIN { - if ( !eval { use HTML::Entities; 1 } ) { + if ( !eval { require HTML::Entities; 1 } ) { $missing_html_entities = $@ ? $@ : 1; } - if ( !eval { use Pod::Html; 1 } ) { + if ( !eval { require Pod::Html; 1 } ) { $missing_pod_html = $@ ? $@ : 1; } } @@ -713,7 +713,7 @@ sub pod_to_html { Perl::Tidy::Die( $_[0] ); }; - pod2html(@args); + Pod::Html::pod2html(@args); } $fh_tmp = IO::File->new( $tmpfile, 'r' ); unless ($fh_tmp) {