Subject: | Global Destruction not properly detected (only?) on Travis (!?) |
Struct::Dumb is an optional upstream prerequisite of WWW::Mechanize::Chrome and it fails (only on Travis) a compile test, because there, Struct::Dumb tries to load Data::Dump::Filtered from the destructor, see the error message below.
This is really weird - the offending test merely loads the module to check it compiles, and that triggers the incorrect global destruction detection. It happens on Perl 5.22 through 5.30, but not on the system perl (5.22 as well).
Maybe using
${^GLOBAL_PHASE} eq "DESTRUCT"
is better, at least for Perl versions above 5.14 ?
A fairly reduced case to reproduce this is just loading Struct::Dumb:
package StructDumbDebug;
use strict;
#use IO::Async::Loop;
#use IO::Async::Stream;
use Struct::Dumb;
our $VERSION = '0.48';
1;
If I can be of help here, please tell me - hopefully, the cause is obvious to you, because I'm not sure what the difference between the Perl versions is that makes your detection of Global Destruction different from ${^GLOBAL_PHASE} and why this breaks now (instead of earlier).
Thanks,
-max
https://travis-ci.org/github/Corion/WWW-Mechanize-Chrome/jobs/676846818
# lib/StructDumbDebug.pm syntax OK
# (in cleanup) Can't locate Data/Dump/Filtered.pm in @INC (you may need to install the Data::Dump::Filtered module) (@INC contains: /home/travis/build/Corion/WWW-Mechanize-Chrome/blib/arch /home/travis/build/Corion/WWW-Mechanize-Chrome/blib/lib /home/travis/build/Corion/WWW-Mechanize-Chrome/lib /home/travis/build/Corion/WWW-Mechanize-Chrome/blib/lib /home/travis/build/Corion/WWW-Mechanize-Chrome/blib/arch /home/travis/perl5/perlbrew/perls/5.22.4/lib/site_perl/5.22.4/x86_64-linux /home/travis/perl5/perlbrew/perls/5.22.4/lib/site_perl/5.22.4 /home/travis/perl5/perlbrew/perls/5.22.4/lib/5.22.4/x86_64-linux /home/travis/perl5/perlbrew/perls/5.22.4/lib/5.22.4 .) at /home/travis/perl5/perlbrew/perls/5.22.4/lib/site_perl/5.22.4/Struct/Dumb.pm line 364 during global destruction.
not ok 29 - lib/StructDumbDebug.pm