[Chicago-talk] Undefined subroutine Class::MOP::Mixin::HasMethods::wrap/body errors

Sean Blanton sean at blanton.com
Mon Feb 7 09:08:59 PST 2011


Uh, yeah, these errors are all from duplicate methods...I'm good. There must
be some Devel:: module to help me dump some more information to identify the
cause of these errors...any suggestions?

Regards,
Sean




On Mon, Feb 7, 2011 at 9:57 AM, Sean Blanton <sean at blanton.com> wrote:

> The errors all come from use and require statements, so they are compile
> errors, not runtime. Also getting this one:
>
> Undefined subroutine &Package::DeprecationManager::_HASH called at
> /usr/local/share/perl5/Package/DeprecationManager.pm line 18.
> BEGIN failed--compilation aborted at
> /usr/local/lib64/perl5/Moose/Deprecated.pm line 22.
> Compilation failed in require at /usr/local/lib64/perl5/Moose.pm line 14.
> BEGIN failed--compilation aborted at /usr/local/lib64/perl5/Moose.pm line
> 14.
> Compilation failed in require at <path>/<class> line 2.
>
>
> In this, the line 2 at <path>/<class> is 'use Moose;'
>
> Regards,
> Sean
>
>
>
>
>
> On Mon, Feb 7, 2011 at 9:52 AM, Sean Blanton <sean at blanton.com> wrote:
>
>> Hi All,
>>
>> I just upgraded from perl 5.10 to v5.12.2 (Fedora 13->14) and am getting
>> the following errors in several classes. I'm hoping someone can give me some
>> high level pointers before I go under the covers to examine the private
>> parts.
>>
>> > Undefined subroutine &Class::MOP::Mixin::HasMethods::wrap called at
>> /usr/local/lib64/perl5/Class/MOP/Mixin/HasMethods.pm line 165.
>>
>> > Undefined subroutine &Class::MOP::Mixin::HasMethods::body called at
>> /usr/local/lib64/perl5/Class/MOP/Mixin/HasMethods.pm line 165.
>>
>> which occurs in:
>> --------------
>> sub remove_method {
>>     my ( $self, $method_name ) = @_;
>>     ( defined $method_name && length $method_name )
>>         || confess "You must define a method name";
>>
>> ****->    my $removed_method = delete
>> $self->_full_method_map->{$method_name};
>>
>>     $self->remove_package_symbol(
>>         { sigil => '&', type => 'CODE', name => $method_name } );
>>
>> --------------
>>
>> I'm not getting a stack trace, which I feel must somehow be my fault, but
>> I normally do get a stack trace. Eclipse tells me the parent class where the
>> error occurs, but it can only give me the message that Perl produces above.
>>
>> My Moose et al. versions went from:
>>
>> Moose  0.99 -> 1.17
>> Moose::Meta::Role 0.99 -> 1.17
>> Class::MOP 0.98 -> 1.10
>> Class::MOP::Mixin::HasMethods 0.98 -> 1.10
>>
>> In one case, I found by removing a method in a role that was overriden by
>> it's consuming class cleared the ::body method error, but I haven't found
>> common traits with other classes having the same error.
>>
>>
>> Regards,
>> Sean
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20110207/d1602126/attachment.html>


More information about the Chicago-talk mailing list