Skip Menu |

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

Report information
The Basics
Id: 86041
Status: resolved
Priority: 0/
Queue: MooseX-Types-LoadableClass

People
Owner: ether [...] cpan.org
Requestors: doubiman [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.008
Fixed in: 0.009



Subject: Misleading exception when using coersion ('undef' instead of requested class).
See minimal example provided. Despite the default of "Module::I::Dont::Have", being provided, the exception output reads: Attribute (thing) does not pass the type constraint because: Validation failed for 'MooseX::Types::LoadableClass::LoadableClass' with value undef at accessor My::Module::thing (defined at loadableclass_coerce_default_minimal.pl line 6) line 21. My::Module::thing('My::Module=HASH(0xa9ada0)') called at loadableclass_coerce_default_minimal.pl line 21 Don't know if this is fixable, may look into it myself later. Just wanted to get it recorded here anyway. Cheers, -d
Subject: loadableclass_coerce_default_minimal.pl
package My::Module; use Moose; use MooseX::Types::LoadableClass qw{LoadableClass}; has thing => ( is => 'rw', coerce => 1, required => 1, lazy => 1, isa => LoadableClass, default => 'Module::I::Dont::Have', ); 1; package main; my $obj = My::Module->new; print $obj->thing;
Fixed in 0.009.