]> git.donarmstrong.com Git - perltidy.git/commitdiff
improved fix for RT #133161, -html not working on pod
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 15 Aug 2020 02:28:17 +0000 (19:28 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 15 Aug 2020 02:28:17 +0000 (19:28 -0700)
CHANGES.md
lib/Perl/Tidy/HtmlWriter.pm

index 48649f32beea8abc549d2f590fb20a2fc47a137a..2244371c0889f7f13646f19c41b62f2c25b46e15 100644 (file)
@@ -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.
index 836f0cab043012c35e55096c35853721c10e43c6..bf4a82d186b3437ff8b3312f8062df2301fa09d2 100644 (file)
@@ -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) {