diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-01-01 17:48:29 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-01-02 11:30:00 +0100 |
commit | 65016092c02f30665d2b0ab8a4774926f71d0dc7 (patch) | |
tree | 7d7126adeb21354bdddadad95ddc621ed5c6af36 /t/re/regexp.t | |
parent | f5aea3e0a38bf6cb0b8b7c2913f06ef81b848d27 (diff) | |
download | perl-65016092c02f30665d2b0ab8a4774926f71d0dc7.tar.gz |
Avoid t/re/regexp.t failing on miniperl when displaying TODO test output.
Change 1e9285c2ad54ae39 refactored Data::Dumper to load on miniperl.
t/re/regexp.t attempts to load Data::Dumper (in an eval) to display failure
output, including the failure of TODO tests. Hence Data::Dumper is now loaded
without error as part of minitest, so regexp.t then attempts to use
Data::Dumper to output better diagnostics. This fails (hard) because
Data::Dumper attempts to load Scalar::Util, which attempts to load B, which
bails out because this is miniperl.
It's not obvious that there's a 100% solution here that gets full-on
Data::Dumper functionality for miniperl.
Diffstat (limited to 't/re/regexp.t')
-rw-r--r-- | t/re/regexp.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/re/regexp.t b/t/re/regexp.t index c54c5a356e..5a08863dc8 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -187,7 +187,11 @@ EOFCODE else { if (!$match || $got ne $expect) { eval { require Data::Dumper }; - if ($@) { + if ($@ || !defined &DynaLoader::boot_DynaLoader) { + # Data::Dumper will load on miniperl, but fail when used in + # anger as it tries to load B. I'd prefer to keep the + # regular calls below outside of an eval so that real + # (unknown) failures get spotted, not ignored. print "not ok $test$todo ($study) $input => '$got', match=$match\n", _comment("$code\n"); } else { # better diagnostics |