Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: [Moose] extends(...) throws "Subroutine redefined" warnings

by Athanasius (Bishop)
on Oct 07, 2015 at 13:01 UTC ( #1144059=note: print w/replies, xml ) Need Help??

in reply to [Moose] extends(...) throws "Subroutine redefined" warnings

Hello muba,

Of course, I could simply ignore the warning, but that doesn't feel clean to me.

For the record, I don’t get a warning, I get a full-blown compiler error:

22:58 >perl -MMyClass -e 0 MyClass already has a metaclass, but it does not inherit Moose::Meta:: +Class (Class::MOP::Class=HASH(0x32b5d20)). at C:\Perl\Strawberry\stra +wberry-perl-\perl\site\lib\Moose\ line 4 +84 Moose::import('Moose') called at line 4 MyClass::BEGIN at line 4 eval {...} at line 4 require at -e line 0 main::BEGIN at line 4 eval {...} at line 4 BEGIN failed--compilation aborted at line 4. Compilation failed in require. BEGIN failed--compilation aborted. 22:58 >p5u v Moose Moose C:\Perl\Strawberry\strawberry-perl-\perl\sit +e\lib\ 2.1603

Are you using an earlier version of Moose?

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^2: [Moose] extends(...) throws "Subroutine redefined" warnings
by muba (Priest) on Oct 07, 2015 at 13:05 UTC

    Uh... yep. -_-

    $ perl -v This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x +64-multi-t hread Copyright 1987-2013, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at, the Perl Home Pa +ge. $ perl -MMoose -e "print Moose->VERSION" 2.1005

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1144059]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2019-05-23 02:40 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (142 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!