Skip Menu |

This queue is for tickets about the Time-Format CPAN distribution.

Report information
The Basics
Id: 19191
Status: resolved
Worked: 8 hours (480 min)
Priority: 0/
Queue: Time-Format

People
Owner: eric.roode.cpan [...] gmail.com
Requestors: aaron [...] FreeBSD.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.02
Fixed in: 1.04



Subject: Prerequisites need to be made explicit
While trying to add this to the BSD ports tree, make test is failing miserably. The Makefile.PL does not list any prerequisites. The POD does, and I install some of them, but I still get errors. If I18N/Langinfo is truly necessary for the use of this port, it should be explicitly requested in the Makefile.PL. Otherwise make test should fail gracefully and not die. Apparently DateTime is tested for, but not listed in the Makefile.PL or in the POD as a prerequisite. It would be most helpful if either: 1) Makefile.PL explicitly stated which modules are truly required for the correct operation of the module or 2) Make test is tweaked so as to gracefully skip optional tests. Below is the output of a make test on a Perl 5.6 jail I run. fivetwoone# make test PERL_DL_NONLAZY=1 /usr/local/bin/perl5.6.2 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/DateManip......ok 2/12Can't locate I18N/Langinfo.pm in @INC (@INC contains: /root/p5-Time-Format/work/Time-Format-1.02/blib/lib /root/p5-Time-Format/work/Time-Format-1.02/blib/arch /usr/local/lib/perl5/site_perl/5.6.2/mach /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.2/BSDPAN /usr/local/lib/perl5/5.6.2/mach /usr/local/lib/perl5/5.6.2 . ..) at (eval 9) line 30, <DATA> line 1. ...propagated at /root/p5-Time-Format/work/Time-Format-1.02/blib/lib/Time/Format.pm line 77, <DATA> chunk 1. # Looks like you planned 12 tests but only ran 2. # Looks like your test died just after 2. t/DateManip......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3-12 Failed 10/12 tests, 16.67% okay t/DateTime.......ok 11/12 skipped: DateTime not available t/die............ok t/doc............ok t/export1........ok t/export2........ok t/export3........ok t/funcs..........ok 1/15Can't locate I18N/Langinfo.pm in @INC (@INC contains: /root/p5-Time-Format/work/Time-Format-1.02/blib/lib /root/p5-Time-Format/work/Time-Format-1.02/blib/arch /usr/local/lib/perl5/site_perl/5.6.2/mach /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.2/BSDPAN /usr/local/lib/perl5/5.6.2/mach /usr/local/lib/perl5/5.6.2 . ..) at (eval 13) line 30, <DATA> line 1. ...propagated at /root/p5-Time-Format/work/Time-Format-1.02/blib/lib/Time/Format.pm line 77, <DATA> chunk 1. # Looks like you planned 15 tests but only ran 2. # Looks like your test died just after 2. t/funcs..........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3-15 Failed 13/15 tests, 13.33% okay t/locale.........ok 6/9 skipped: various reasons t/manip..........ok t/quot...........ok t/strftime.......ok t/string.........ok 1/21Can't locate I18N/Langinfo.pm in @INC (@INC contains: /root/p5-Time-Format/work/Time-Format-1.02/blib/lib /root/p5-Time-Format/work/Time-Format-1.02/blib/arch /usr/local/lib/perl5/site_perl/5.6.2/mach /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.2/BSDPAN /usr/local/lib/perl5/5.6.2/mach /usr/local/lib/perl5/5.6.2 . ..) at (eval 6) line 30, <DATA> line 1. ...propagated at /root/p5-Time-Format/work/Time-Format-1.02/blib/lib/Time/Format.pm line 77, <DATA> chunk 1. # Looks like you planned 21 tests but only ran 2. # Looks like your test died just after 2. t/string.........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3-21 Failed 19/21 tests, 9.52% okay t/time...........ok t/xs_DateTime....ok 11/12 skipped: DateTime not available t/xs_doc.........ok 16/18 skipped: XS version not available t/xs_funcs.......ok 4/5 skipped: XS version not available t/xs_locale......ok 8/9 skipped: XS version not available t/xs_quot........ok 22/23 skipped: XS version not available t/xs_time........ok 77/78 skipped: XS version not available Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/DateManip.t 255 65280 12 20 166.67% 3-12 t/funcs.t 255 65280 15 26 173.33% 3-15 t/string.t 255 65280 21 38 180.95% 3-21 155 subtests skipped. Failed 3/20 test scripts, 85.00% okay. 42/377 subtests failed, 88.86% okay. *** Error code 35 Stop in /root/p5-Time-Format/work/Time-Format-1.02.
From: ROODE [...] cpan.org
This is odd. The prerequisites, including I18N::LangInfo, are supposed to be optional, and the module checks for errors whenever it tries to use any of them. Each of the errors you received occurred at line 77 of Format.pm, which is where the Perl-only subroutines are loaded and compiled. The actual error is propagated from line 30 of the __DATA__ segment, which is line 266 of the module, which is "require I18N::LangInfo;". But that line is enclosed in an eval{} block to trap any errors. Control should continue after the eval statement, onto line 281 of the module. I can't imagine why that is not happening. I cannot reproduce this problem (I currently have access to ActiveState Perl on Windows XP, and Cygwin Perl).
This should be resolved in v1.05.