Skip Menu |

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 91311
Status: rejected
Priority: 0/
Queue: CHI

People
Owner: Nobody in particular
Requestors: ac0v [...] sys-network.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.58
Fixed in: (no value)



Subject: Broken Types.pm using MooX::Types
I'm not able to get CHI running out of the box. The problem can be reproduced eg.: 22:31:58 ツ ~/ > perl -e 'use CHI; CHI->new(driver => 'File');' Must define a 'from' namespace for the parent type: CODE(0x25ec298) when defining type: Duration at /home/spechtan/workspace/JEP/lib//CHI/Types.pm line 56 Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/CHI/Driver/Role/HasSubcaches.pm line 6. BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/5.12.4/CHI/Driver/Role/HasSubcaches.pm line 6. Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/CHI/Driver.pm line 9. BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/5.12.4/CHI/Driver.pm line 9. Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/Module/Runtime.pm line 317. Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/Module/Runtime.pm line 317. I've attached a small patch (which is not perfect - but if works around the issue at least).
Subject: fix-moox-type-compatibility-issue.patch
diff --git a/lib/CHI/Types.pm b/lib/CHI/Types.pm index f4d349a..1a883e3 100644 --- a/lib/CHI/Types.pm +++ b/lib/CHI/Types.pm @@ -24,6 +24,7 @@ MooX::Types::MooseLike::register_types([ { name => 'Duration', subtype_of => PositiveInt, + from => 'MooX::Types::MooseLike::Numeric', test => sub { 1 }, message => sub { return exception_message($_[0], 'a positive integer') }, inflate => 0, @@ -31,6 +32,7 @@ MooX::Types::MooseLike::register_types([ { name => 'MemorySize', subtype_of => PositiveInt, + from => 'MooX::Types::MooseLike::Numeric', test => sub { 1 }, message => sub { return exception_message($_[0], 'a positive integer') }, inflate => 0, @@ -43,14 +45,16 @@ MooX::Types::MooseLike::register_types([ }, { name => 'Serializer', - subtype_of => Object, +# subtype_of => Object, +# from => 'MooX::Types::MooseLike::Base', test => sub { 1 }, message => sub { return exception_message($_[0], 'a serializer, hashref, or string') }, inflate => 0, }, { name => 'Digester', - subtype_of => Object, +# subtype_of => Object, +# from => 'MooX::Types::MooseLike::Base', test => sub { 1 }, message => sub { return exception_message($_[0], 'a digester, hashref, or string') }, inflate => 0, -- 1.8.1.1
Can you check what version of MooX::Types::MooseLike you have? You can check by running: perl -mMooX::Types::MooseLike -le'print MooX::Types::MooseLike->VERSION'
Am Di 10. Dez 2013, 16:46:41, haarg schrieb: Show quoted text
> Can you check what version of MooX::Types::MooseLike you have? You > can check by running: > > perl -mMooX::Types::MooseLike -le'print MooX::Types::MooseLike-
> >VERSION'
for sure; I've 0.21 installed here
On Tue Dec 10 17:05:56 2013, ACID wrote: Show quoted text
> Am Di 10. Dez 2013, 16:46:41, haarg schrieb:
> > Can you check what version of MooX::Types::MooseLike you have? You > > can check by running: > > > > perl -mMooX::Types::MooseLike -le'print MooX::Types::MooseLike-
> > >VERSION'
> > for sure; I've 0.21 installed here
The problem is that your MooX::Types::MooseLike is not up to date. CHI's Makefile.PL, META.json, and META.yml all list a 0.23 as the required version. How did you install CHI?
Am Di 10. Dez 2013, 17:19:56, haarg schrieb: Show quoted text
> On Tue Dec 10 17:05:56 2013, ACID wrote:
> > Am Di 10. Dez 2013, 16:46:41, haarg schrieb:
> > > Can you check what version of MooX::Types::MooseLike you have? You > > > can check by running: > > > > > > perl -mMooX::Types::MooseLike -le'print MooX::Types::MooseLike-
> > > > VERSION'
> > > > for sure; I've 0.21 installed here
> > The problem is that your MooX::Types::MooseLike is not up to date. > CHI's Makefile.PL, META.json, and META.yml all list a 0.23 as the > required version. How did you install CHI?
Oh, f** didn't saw that. I'd to install it on a Gentoo System. There is already a Bug reported at https://bugs.gentoo.org/show_bug.cgi?id=489812 Sorry for not finding that before creating the bug here. May it would be an idea to depend hardly on a >= version by specifying it like eg. use MooX::Types::MooseLike 0.23 ...; But of course the META.yml stuff should really be enough - also for building Gentoo packages ;-) Thx for your fast reply.