Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 62061
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: tokuhirom+cpan [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.65



Subject: t/39no-so.t FAIL
t/39no-so.t FAILs on my machine with following result. ----------------------------------------------------- not ok 1 - No error loading DateTime without DateTime.so file # Failed test 'No error loading DateTime without DateTime.so file' # at t/39no-so.t line 23. # got: 'Can't locate loadable object for module DateTime in @INC at t/39no-so.t line 11. # Compilation failed in require at /usr/local/app/perl-5.12.1/lib/5.12.1/x86_64- linux/Scalar/Util.pm line 11. # Compilation failed in require at /home/tokuhirom/.cpanm/work/1286842404.660/DateTime- 0.63/blib/lib/DateTime/Helpers.pm line 8. # BEGIN failed--compilation aborted at /home/tokuhirom/.cpanm/work/1286842404.660/DateTime- 0.63/blib/lib/DateTime/Helpers.pm line 8. # Compilation failed in require at /home/tokuhirom/.cpanm/work/1286842404.660/DateTime-0.63/blib/lib/DateTime.pm line 9. # BEGIN failed--compilation aborted at /home/tokuhirom/.cpanm/work/1286842404.660/DateTime-0.63/blib/lib/DateTime.pm line 9. # Compilation failed in require at t/39no-so.t line 22. # ' # expected: '' not ok 2 - $DateTime::IsPurePerl is true # Failed test '$DateTime::IsPurePerl is true' # at t/39no-so.t line 24. Can't locate object method "new" via package "DateTime" at t/39no-so.t line 26. # Tests were run but no plan was declared and done_testing() was not seen. --------------------------------------------------------- I seems recent Test::More doesn't load Scalar::Util. I'm using Test::More 0.9701 and Scalar-List-Utils 1.2303. This issue is fixed by following patch. -------------------------------------------------- diff --git a/t/39no-so.t b/t/39no-so.t index d396cb6..e9cfd74 100644 --- a/t/39no-so.t +++ b/t/39no-so.t @@ -7,15 +7,24 @@ use Test::More; no warnings 'once', 'redefine'; +my $orig; my $sub - = sub { die q{Can't locate loadable object for module DateTime in @INC} }; + = sub { + if ($_[0] eq 'DateTime') { + die q{Can't locate loadable object for module DateTime in @INC} + } else { + goto $orig; + } + }; if ( $] >= 5.006 ) { require XSLoader; + $orig = *XSLoader::load{CODE}; *XSLoader::load = $sub; } else { require DynaLoader; + $orig = *DynaLoader::bootstrap{CODE}; *DynaLoader::bootstrap = $sub; }