Skip Menu |

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

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

People
Owner: perl [...] toby.ink
Requestors: Support [...] RoxSoft.co.uk
Cc:
AdminCc:

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



Subject: Can't locate object method "NAME" via package "B::SPECIAL"
I'm getting the following error: DBIx::Class::Schema::throw_exception(): Can't locate object method "NAME" via package "B::SPECIAL" at /usr/local/share/perl/5.10.1/Exporter/TypeTiny.pm line 144 I Googled for it and discovered that protecting against calling NAME on B::SPECIAL is normal. The attached one line patch fixes the problem. Sorry no test case. It's embeded in too much code
Subject: Exporter-TypeTiny.patch
--- TypeTiny.pm.orig 2013-06-24 14:44:12.000000000 +0100 +++ TypeTiny.pm 2013-06-24 14:44:49.000000000 +0100 @@ -141,6 +141,7 @@ for (grep ref, $into->can($name)) { my $cv = B::svref_2object($_); + $cv->STASH->can( 'NAME' ) or next; $cv->STASH->NAME eq $into and _croak("Refusing to overwrite local sub '$name' with export from $class"); }
Thanks. I've checked this change into my repo. Do you have a simple example that triggers the error, so I can create a test case for it?
The fix for this is in 0.011_01 and the stable 0.012. It looks like I've neglected to mention it in the changelog, but I'll update that in the repo now. Thanks for the bug report.