Skip Menu |

This queue is for tickets about the MooseX-Types-DateTimeX CPAN distribution.

Report information
The Basics
Id: 73467
Status: resolved
Priority: 0/
Queue: MooseX-Types-DateTimeX

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.10
Fixed in: (no value)



Subject: Fails with MooseX::Types::DateTime::ButMaintained 0.14
As per subject. I have not yet observed all permutations of Moose and MooseX::Types::DateTime::ButMaintained and DateTime and what else may be involved but the number of PASS reports for MooseX-Types-DateTimeX is rapidly declining due to updated dependencies. More than one dependency issue is relevent but the final breakage seems to come with ECARROLL/MooseX-Types-DateTime-ButMaintained-0.14.tar.gz Sample fail reports: http://analysis.cpantesters.org/reports_by_field?SUBMIT_xxx=Submit&distv=MooseX-Types-DateTimeX-0.10;field=mod%3AMoose&field=mod%3AMooseX%3A%3ATypes%3A%3ADateTime%3A%3AButMaintained;order=1ta,3nd Let me know if you need further hints. HTH, Thanks && Regards,
From: mmaslano [...] redhat.com
The test of this package fails since Moose-2.0300. I don't know much about Moose, but I guess it's change of subtype definition http://search.cpan.org/~doy/Moose-2.0401/lib/Moose/Manual/Delta.pod#2.0300
Subject: MooseX-Types-DateTimeX-0.10-fix_subtypes.patch
diff -up MooseX-Types-DateTimeX-0.10/lib/MooseX/Types/DateTimeX.pm.old MooseX-Types-DateTimeX-0.10/lib/MooseX/Types/DateTimeX.pm --- MooseX-Types-DateTimeX-0.10/lib/MooseX/Types/DateTimeX.pm.old 2010-09-21 17:51:35.000000000 +0200 +++ MooseX-Types-DateTimeX-0.10/lib/MooseX/Types/DateTimeX.pm 2012-01-26 12:01:38.481463296 +0100 @@ -15,13 +15,13 @@ our $VERSION = '0.10'; use MooseX::Types -declare => [qw( DateTime Duration)]; -subtype DateTime, as MooseX::Types::DateTime::ButMaintained::DateTime; +subtype DateTime, as 'MooseX::Types::DateTime::ButMaintained::DateTime'; coerce( DateTime, @{ $MooseX::Types::DateTime::ButMaintained::coercions{DateTime} }, from Str, via { DateTimeX::Easy->new($_) }, ); -subtype Duration, as MooseX::Types::DateTime::ButMaintained::Duration; +subtype Duration, as 'MooseX::Types::DateTime::ButMaintained::Duration'; coerce( Duration, @{ $MooseX::Types::DateTime::ButMaintained::coercions{"DateTime::Duration"} }, from Str, via {

A likely explanation is thus:



use namespace::autoclean   # <-- removing the Type symbols so they can't be accessed by referring to them by their global name.


Changing this line to:

use namespace::autoclean -except => [qw( DateTime Duration TimeZone Locale Now )];

Prevents these symbols getting stripped, and makes MooseX::Types::DateTimeX work again.

I still don't understand why I don't get this error. That said, I've moved ns::ac until after mx::t's declare statement. I'll push up a copy now. If this doesn't work, please confirm that the -except will work and I'll change it and push up.. Though I'm confused as to why it would work fine for me. I can't even even install MX:T:DTX because Date::Manip is broke, and I don't care enough to fix it. Though if I got maint on Date::Manip I probably would care enough -- I submitted a patch before and it took like three years to get it included. https://rt.cpan.org/Ticket/Display.html?id=77766 -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Attempted to change order of namespace::autoclean, *please* reopen if the problem persists. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com