Skip Menu |

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 98113
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: Nobody in particular
Requestors: Support [...] RoxSoft.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: No overloaded magic
I upgraded just one module, Moo from 1.005000 to 1.006000 and now I get Operation "eq": no method found, left argument in overloaded package Type::Coercion, right argument has no overloaded magic at /home/pjf/Perl/lib/perl5/Method/Generate/Accessor.pm line 72. and test failures also http://www.cpantesters.org/cpan/report/1bf706b0-262f-11e4-a38e-499fc7ccabfc Type::Tiny is at 1.0 both locally and on the smoker
In Method::Generate::Accessor this line would work better if (defined $spec->{coerce} and not ref $spec->{coerce} eq 'Type::Coercion' and ($spec->{coerce}||0) eq 1) {
CC: undisclosed-recipients:;
Subject: Re: [rt.cpan.org #98113] No overloaded magic
Date: Mon, 18 Aug 2014 12:44:52 +0100
To: bug-Moo [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
"Peter Flanigan via RT" <bug-Moo@rt.cpan.org> writes: Show quoted text
> I upgraded just one module, Moo from 1.005000 to 1.006000 and now I get > > Operation "eq": no method found, > left argument in overloaded package Type::Coercion, > right argument has no overloaded magic at > /home/pjf/Perl/lib/perl5/Method/Generate/Accessor.pm line 72.
You don't say which version of perl you're using, Show quoted text
but this test failure is on perl 5.10.1, which has buggy overloading and loses the fallback value if you call overload->import. Type::Coercion does use overload q("") => sub { caller =~ m{^(Moo::HandleMoose|Sub::Quote)} ? overload::StrVal($_[0]) : $_[0]->display_name }, q(bool) => sub { 1 }, q(&{}) => "_overload_coderef", fallback => 1, ; BEGIN { require Type::Tiny; overload->import(q(~~) => sub { $_[0]->has_coercion_for_value($_[1]) }) if Type::Tiny::SUPPORT_SMARTMATCH(); } Adding 'fallback => 1' to the ->import call fixes this. I'll send a pull request to Type::Tiny to fix this. -- - Twitter seems more influential [than blogs] in the 'gets reported in the mainstream press' sense at least. - Matt McLeod - That'd be because the content of a tweet is easier to condense down to a mainstream media article. - Calle Dybedahl
On 2014-08-18T13:58:26+01:00, ilmari wrote: Show quoted text
Thanks - I'll get this merged and released later today. -Toby
Resolved in 1.000002.