Skip Menu |

This queue is for tickets about the Google-Chart CPAN distribution.

Report information
The Basics
Id: 86276
Status: new
Priority: 0/
Queue: Google-Chart

People
Owner: Nobody in particular
Requestors: ian.sillitoe [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.09000_05
Fixed in: (no value)



Subject: Duplicate coercion breaks tests with latest Moose [patch]
Many thanks for your work on this module. I'm using the devel branch in production and I've found it useful. I've upgraded Moose and I'm getting failing tests running Google-Chart-0.09000_05 - seems to come down to a coercion that has been defined twice: {{{ A coercion action already exists for 'Str' at .../Moose/Meta/TypeCoercion.pm line 92. Moose::Meta::TypeCoercion::add_type_coercions('Moose::Meta::TypeCoercion=HASH(0x2cd76f8)', 'Str', 'CODE(0x2cc1600)') called at .../Moose/Util/TypeConstraints.pm line 590 Moose::Util::TypeConstraints::_install_type_coercions('Google::Chart::Size', 'ARRAY(0x2ce5168)') called at .../Moose/Util/TypeConstraints.pm line 403 Moose::Util::TypeConstraints::coerce('Google::Chart::Size', 'Str', 'CODE(0x2cc1600)') called at .../lib/Google/Chart/Types.pm line 103 require Google/Chart/Types.pm called at .../lib/Google/Chart/Data.pm line 8 }}} The patch is trivial (attached): Index: lib/Google/Chart/Types.pm =================================================================== --- lib/Google/Chart/Types.pm (revision 15932) +++ lib/Google/Chart/Types.pm (working copy) @@ -92,16 +92,6 @@ } ; - class_type 'Google::Chart::Size'; - coerce 'Google::Chart::Size' - => from 'Str' - => via { - my %args; - @args{ qw(width height) } = split /x/, $_; - return Google::Chart::Size->new(%args); - } - ; - class_type 'Google::Chart::Title'; coerce 'Google::Chart::Title' => from 'Str'
Subject: fix_duplicate_coercion.diff
Index: lib/Google/Chart/Types.pm =================================================================== --- lib/Google/Chart/Types.pm (revision 15932) +++ lib/Google/Chart/Types.pm (working copy) @@ -92,16 +92,6 @@ } ; - class_type 'Google::Chart::Size'; - coerce 'Google::Chart::Size' - => from 'Str' - => via { - my %args; - @args{ qw(width height) } = split /x/, $_; - return Google::Chart::Size->new(%args); - } - ; - class_type 'Google::Chart::Title'; coerce 'Google::Chart::Title' => from 'Str'