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");
}