This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix indirect method call in ExtUtils::Constant test
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Mon, 13 Jul 2020 21:08:45 +0000 (22:08 +0100)
committerKarl Williamson <khw@cpan.org>
Thu, 30 Jul 2020 21:51:36 +0000 (15:51 -0600)
It puts both "use $];" and "bootstrap $package \$VERSION;" in the
generated test module, which is going to break if we ever remove
`indirect` from the current feature bundle.

Fix by making the method call direct instead.

cpan/ExtUtils-Constant/t/Constant.t

index d6b4566..526a32c 100644 (file)
@@ -435,7 +435,7 @@ EOT
   print FH ");\n";
   # Print the AUTOLOAD subroutine ExtUtils::Constant generated for us
   print FH autoload ($package, $]);
-  print FH "bootstrap $package \$VERSION;\n1;\n__END__\n";
+  print FH "$package->bootstrap(\$VERSION);\n1;\n__END__\n";
   close FH or die "close $pm: $!\n";
 
   ################ test.pl