Subject: | Bug and Solution found. |
Date: | Fri, 1 Oct 2010 16:17:48 -0500 |
To: | "bug-Net-Akamai [...] rt.cpan.org" <bug-Net-Akamai [...] rt.cpan.org> |
From: | Jeronimo Robles <jeronimo [...] dcheetah.com> |
Net::Akamai Module Version: 0.13
Perl Version 5.8.4
OS Linux 2.6.9-89.0.16.ELsmp
Displayed error: "Attribute (res_data) does not pass the type constraint because: Validation failed for 'Net::Akamai::ResponseData' with value HASH(0x8cc3274) (not isa Net::Akamai::ResponseData) at /usr/local/ActivePerl-5.8/lib/site_perl/5.8.4/Net/Akamai.pm line 146"
Solution:
Move the coerce restriction before the has 'res_data'
coerce 'Net::Akamai::ResponseData'
=> from 'HashRef'
=> via { Net::Akamai::ResponseData->new($_) };
has 'res_data' => (
is => 'rw',
isa => 'Net::Akamai::ResponseData',
coerce => 1,
);
Regards,
Jeronimo