Skip Menu |

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 102748
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: Nobody in particular
Requestors: spam-bitcard [...] yary.ack.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.000005
Fixed in: (no value)



Subject: Type::Library can't consume MooseX::Types::DBIx::Class
This code fails with "coercion => 1 requires type to have a direct parent with a coercion" (and I am using Type::Tiny as packaged with ActiveState's ppm on Perl 5.20.1, 64-bit Windows) package MyApp::Types; use strict; use warnings; use namespace::autoclean; use Type::Library -base; use Type::Utils 'extends'; BEGIN { extends 'MooseX::Types::DBIx::Class'; } 1; __END__ perl -c lib/MyApp/Types.pm coercion => 1 requires type to have a direct parent with a coercion at lib\MyApp\Types.pm line 10. BEGIN failed--compilation aborted at lib\BPM\Engine\Types.pm line 12. I'll try upgrading to the latest on CPAN and report back.
From: spam-bitcard [...] yary.ack.org
I just saw that the version of Type::Tiny I have installed is the most recent release, the 1.001 series is marked as "DEV." So my original bug report stands.
Type::Tiny bundles Type::Coercion::FromMoose which is used to adopt coercions from native Moose types. MooseX::Types::DBIx::Class uses MooseX::Types::Parameterizable to build some of its constraints. This uses MooseX::Meta::TypeCoercion::Parameterizable for its coercions, and that appears to confuse Type::Coercion::FromMoose. I'll look into how this can be fixed, but I'll also note that MooseX::Types::Parameterizable fails its test suite on recent versions of Perl and doesn't look like it's being actively maintained.
Patched in my repo. I'll push to Github soon and it'll be in 1.006001.
Fixed in Type::Tiny 1.007_xxx.