Closed a-jar closed 11 years ago
Sorry for the slow reply on this one. I can't seem to duplicate this. If I set the insured_value with Data::Currency, I don't get the error:
use Data::Currency;
my @packages = (
Shipment::Package->new(
weight => 10.1,
length => 18,
width => 18,
height => 24,
insured_value => Data::Currency->new(1),
),
);
Poking around I found you could set the insured_value when creating a package... However we can't seem to set it without throwing an error.
We set it during package creation like this:
Setup the package information
Which throws an error like this:
Attribute (insured_value) does not pass the type constraint because: Validation failed for 'Data::Currency' with value 111.00 (not isa Data::Currency) at /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux/Moose/Meta/Attribute.pm line 1275
We've tried every possible formatting for the insured value... even formatting it with Data:Currency (my $fedex_value = Data::Currency->new($dec_value);) but nothing seems to work...