Subject: | Geometry::Primitive fails tests with Moose-2.1202 |
Date: | Fri, 24 Jan 2014 13:57:05 -0700 |
To: | bug-geometry-primitive [...] rt.cpan.org |
From: | Maxwell Carey <mcarey [...] ucar.edu> |
Geometry::Primitive fails one of its tests with the following error when
using Moose-2.1202:
Error: You cannot coerce an attribute (origin) unless its type
(Geometry::Primitive::Point) has a coercion at
/usr/local/lib64/perl5/Moose/Exception.pm line 37
The test succeeds with Moose-2.1005. I've never used Moose but looking
at the changelog
(https://metacpan.org/source/ETHER/Moose-2.1202/Changes), I'm guessing
the cause is a change made in v2.1100:
|-| |Many deprecated features have now been removed:
...
||-| |setting coerce => 1 on an attribute whose type constraint has no
coercion
Here is the full test output:
|# Testing Geometry::Primitive 0.22, Perl 5.010001, /usr/bin/perl
t/00-load.t ........ ok
t/000-point.t ...... ok
t/001-arc.t ........ ok
# Failed test 'use Geometry::Primitive::Ellipse;'
# at t/001-ellipse.t line 4.
# Tried to use 'Geometry::Primitive::Ellipse'.
# Error: You cannot coerce an attribute (origin) unless its type
(Geometry::Primitive::Point) has a coercion at
/usr/local/lib64/perl5/Moose/Exception.pm line 37
#
Moose::Exception::_build_trace('Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion=HASH(0x28fd018)')
called at reader Moose::Exception::trace (defined at /us
r/local/lib64/perl5/Moose/Exception.pm line 9) line 7
#
Moose::Exception::trace('Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion=HASH(0x28fd018)')
called at /usr/local/lib64/perl5/Moose/Exception.pm line 49
#
Moose::Exception::BUILD('Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion=HASH(0x28fd018)',
'HASH(0x28fc8b0)') called at /usr/local/lib64/perl5/Class/MOP/M
ethod.pm line 128
# Class::MOP::Method::execute('Moose::Meta::Method=HASH(0x2a03728)',
'Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion=HASH(0x28fd018)',
'HASH(0x28fc8b0)') c
alled at /usr/local/lib64/perl5/Moose/Object.pm line 56
#
Moose::Object::BUILDALL('Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion=HASH(0x28fd018)',
'HASH(0x28fc8b0)') called at /usr/local/lib64/perl5/Moose/Meta/
Class.pm line 282
# Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x29626d8)',
'HASH(0x28fc8b0)') called at /usr/local/lib64/perl5/Moose/Object.pm line 27
#
Moose::Object::new('Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion',
'attribute_name', 'origin', 'type_name', 'Geometry::Primitive::Point',
'params', 'HA
SH(0x2411c60)') called at /usr/local/lib64/perl5/Moose/Util.pm line 51
#
Moose::Util::throw_exception('CannotCoerceAttributeWhichHasNoCoercion',
'attribute_name', 'origin', 'type_name', 'Geometry::Primitive::Point',
'params', 'HASH(0x241
1c60)') called at /usr/local/lib64/perl5/Moose/Meta/Attribute.pm line 393
#
Moose::Meta::Attribute::_process_coerce_option('Moose::Meta::Attribute',
'origin', 'HASH(0x2411c60)') called at
/usr/local/lib64/perl5/Moose/Meta/Attribute.pm line 262
# Moose::Meta::Attribute::_process_options('Moose::Meta::Attribute',
'origin', 'HASH(0x2411c60)') called at
/usr/local/lib64/perl5/Moose/Meta/Attribute.pm line 53
# Moose::Meta::Attribute::new('Moose::Meta::Attribute', 'origin',
'coerce', 1, 'isa', 'Geometry::Primitive::Point', 'definition_context',
'HASH(0x28ffea0)', 'is', 'rw') called at
/usr/local/lib64/perl5/Moose/Meta/Attribute.pm line 101
#
Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Attribute',
'origin', 'definition_context', 'HASH(0x28ffea0)', 'is', 'rw', 'isa',
'Geometry::Primitive::Point', 'coerce', 1) called at
/usr/local/lib64/perl5/Moose/Meta/Class.pm line 716
#
Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class=HASH(0x25d7290)',
'origin', 'definition_context', 'HASH(0x28ffea0)', 'is', 'rw', 'isa',
'Geometry::Primitive::Point', 'coerce', 1) called at
/usr/local/lib64/perl5/Moose/Meta/Class.pm line 709
#
Moose::Meta::Class::_process_attribute('Moose::Meta::Class=HASH(0x25d7290)',
'origin', 'definition_context', 'HASH(0x28ffea0)', 'is', 'rw', 'isa',
'Geometry::Primitive::Point', 'coerce', 1) called at
/usr/local/lib64/perl5/Moose/Meta/Class.pm line 573
#
Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x25d7290)',
'origin', 'definition_context', 'HASH(0x28ffea0)', 'is', 'rw', 'isa',
'Geometry::Primitive::Point', 'coerce', 1) called at
/usr/local/lib64/perl5/Moose.pm line 77
# Moose::has('Moose::Meta::Class=HASH(0x25d7290)', 'origin', 'is',
'rw', 'isa', 'Geometry::Primitive::Point', 'coerce', 1) called at
/usr/local/lib64/perl5/Moose/Exporter.pm line 405
# Moose::has('origin', 'is', 'rw', 'isa',
'Geometry::Primitive::Point', 'coerce', 1) called at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 14
# require Geometry/Primitive/Ellipse.pm at (eval 4) line 2
# main::BEGIN at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 0
# eval {...} at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 0
# eval 'package main;
# use Geometry::Primitive::Ellipse @{$args[0]};
# 1;
#
# ;' at /usr/local/share/perl5/Test/More.pm line 885
# Test::More::_eval('package main;^Juse
Geometry::Primitive::Ellipse @{$args[0]};^J1;^J', 'ARRAY(0x1b627e8)')
called at /usr/local/share/perl5/Test/More.pm line 860
# Test::More::use_ok('Geometry::Primitive::Ellipse') called at
t/001-ellipse.t line 4
# main::BEGIN at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 0
# eval {...} at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 0
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
Can't locate object method "width" via package
"Geometry::Primitive::Ellipse" at
/root/.cpanm/work/1390595937.2999/Geometry-Primitive-0.22/blib/lib/Geometry/Primitive/Ellipse.pm
line 27.
# Looks like you planned 3 tests but ran 2.
# Looks like you failed 1 test of 2 run.
# Looks like your test exited with 255 just after 2.
t/001-ellipse.t ....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/3 subtests
t/001-line.t ....... ok
t/001-polygon.t .... ok
t/002-bezier.t ..... ok
t/002-circle.t ..... ok
t/010-serialize.t .. ok
t/dimension.t ...... ok
Test Summary Report
-------------------
t/001-ellipse.t (Wstat: 65280 Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 3 tests but ran 2.
Files=10, Tests=63, 4 wallclock secs ( 0.04 usr 0.02 sys + 3.28 cusr
0.19 csys = 3.53 CPU)
Result: FAIL
Failed 1/10 test programs. 1/63 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing Geometry::Primitive failed. See
/root/.cpanm/work/1390595937.2999/build.log for details. Retry with
--force to force install it.