atrodo / App-MechaCPAN

Mechanize the installation of CPAN things
Other
2 stars 2 forks source link

Fails with perl 5.41.3 and newer because of given/when removal #25

Open eserte opened 1 week ago

eserte commented 1 week ago

t/25_depend_source.t fails with bleadperl like this:

# (BEGIN) Try::Tiny => 
# cwd => /tmp/mechacpan_t_TxfET38S
# Try::Tiny => 
Failed to install 2 modules
t/25_depend_source.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 

Unfortunately there's no diagnostics here (could this be improved?). Using some printf-style debugging I found out that a t/when.t test is failing, probably one in Try-Tiny-0.24. So my guess was that this test failed due to some recent removals in bleadperl, and upgrading to the latest Try-Tiny could help. Indeed, with the following change the test again passes:

diff --git i/t/25_depend_source.t w/t/25_depend_source.t
index 95a92c4..8af0797 100644
--- i/t/25_depend_source.t
+++ w/t/25_depend_source.t
@@ -19,7 +19,7 @@ my $deplib  = 'Try/Tiny';
 my $options = {
   source => {
     $lib        => "$pwd/test_dists/$lib/$lib-1.0.tar.gz",
-    'Try::Tiny' => 'E/ET/ETHER/Try-Tiny-0.24.tar.gz',
+    'Try::Tiny' => 'E/ET/ETHER/Try-Tiny-0.32.tar.gz',
   },
 };

@@ -43,7 +43,7 @@ diag("Try::Tiny => $INC{'Try/Tiny.pm'}");
 }

 diag("Try::Tiny => $INC{'Try/Tiny.pm'}");
-is( $Try::Tiny::VERSION, '0.24', "The correct version was installed" );
+is( $Try::Tiny::VERSION, '0.32', "The correct version was installed" );

 chdir $pwd;
 done_testing;