From d4a873e477dc2f0631688b2c55989eae3114e07f Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 14 Aug 2020 19:28:17 -0700 Subject: [PATCH] improved fix for RT #133161, -html not working on pod --- CHANGES.md | 2 ++ lib/Perl/Tidy/HtmlWriter.pm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) 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) { -- 2.39.5