This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow test cases to change arguments to pod2html
authorMarc Green <marcgreen@cpan.org>
Thu, 9 Jun 2011 14:04:58 +0000 (10:04 -0400)
committerMarc Green <marcgreen@cpan.org>
Mon, 31 Oct 2011 17:26:39 +0000 (13:26 -0400)
ext/Pod-Html/t/pod2html-lib.pl

index 0f39712..fbdf4ae 100644 (file)
@@ -4,17 +4,19 @@ require Config;
 use File::Spec::Functions;
 
 sub convert_n_test {
-    my($podfile, $testname) = @_;
+    my($podfile, $testname, @p2h_args) = @_;
 
     my $cwd = Cwd::cwd();
     my $new_dir  = catdir $cwd, "t";
     my $infile   = catfile $new_dir, "$podfile.pod";
     my $outfile  = catfile $new_dir, "$podfile.html";
+    
+    # If other args to p2h are needed,use @p2h_args
+    @p2h_args = ("--podpath=t", "--htmlroot=/") unless @p2h_args;
 
     Pod::Html::pod2html(
-        "--podpath=t",
+        @p2h_args,
         "--podroot=$cwd",
-        "--htmlroot=/",
         "--infile=$infile",
         "--outfile=$outfile"
     );