Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 420033

Summary: dev-perl/MooseX-Types-DateTimeX fails tests with MooseX-Types-DateTime-ButMaintained-0.140.0
Product: Gentoo Linux Reporter: Kent Fredric (IRC: kent\n) (RETIRED) <kentnl>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300119    
Attachments: fix for test failure

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2012-06-07 05:18:27 UTC
make --jobs=10 --load-average=4.0 test TEST_VERBOSE=0
PERL_DL_NONLAZY=1 /usr/bin/perl5.16.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/01_basic.t
t/01_basic.t .. 1/28 
#   Failed test 'use MooseX::Types::DateTimeX;'
#   at t/01_basic.t line 14.
#     Tried to use 'MooseX::Types::DateTimeX'.
#     Error:  Bareword "MooseX::Types::DateTime::ButMaintained::DateTime" not allowed while "strict subs" in use at /tmp/portage/dev-perl-MooseX-Types-DateTimeX-0.60.0/work/MooseX-Types-DateTimeX-0.06/blib/lib/MooseX/Types/ line 18.
# Bareword "MooseX::Types::DateTime::ButMaintained::Duration" not allowed while "strict subs" in use at /tmp/portage/dev-perl-MooseX-Types-DateTimeX-0.60.0/work/MooseX-Types-DateTimeX-0.06/blib/lib/MooseX/Types/ line 24.
# Compilation failed in require at (eval 934) line 2.
# BEGIN failed--compilation aborted at (eval 934) line 2.
Attempt to reload MooseX/Types/ aborted.
Compilation failed in require at t/01_basic.t line 40.
BEGIN failed--compilation aborted at t/01_basic.t line 40.
# Looks like you planned 28 tests but ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test exited with 255 just after 1.
t/01_basic.t .. Dubious, test returned 255 (wstat 65280, 0xff00)

It would appear the issue is caused by MooseX::Types::DateTime::ButMaintained stripping the ::DateTime symbol. 

Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-06-15 22:29:47 UTC
Created attachment 351062 [details, diff]
fix for test failure

Upstream tried to fix this removing namespace::autoclean, but that didn't solve the problem.

Additionally, this test *only* fails if you have installed DateTime::Format::DateManip, because the tests don't even run without that.

( And a working version of DateTime::Format::DateManip requires DateManip <6  )

This attached patch seems to make tests pass reliably.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-06-15 22:40:58 UTC
Actually, on second look, don't apply that *just* yet, it works enough for tests to pass, and the module probably works most of the time as a result, but the underlying mechanism looks broken still, and will need a new release of ::ButMaintained to fix it.
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-06-15 23:03:02 UTC
Just double checked my logic, that patch is good to go.
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2014-12-12 21:58:36 UTC
Patch added in 0.100.0