Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 71640
Status: stalled
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: timk [...] jtse.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 2.0205
  • 2.0300-TRIAL
Fixed in: (no value)



Observed via code inspection, I believe the following is a typo, in Moose.pm line 165 ff: unless ( $meta->isa("Moose::Meta::Class") ) { my $error_message = "$class already has a metaclass, but it does not inherit $metaclass ($meta)."; I believe the condition in the first line ought to read: $meta->isa($metaclass). Usually won't cause a problem, since usually $metaclass eq "Moose::Meta::Class". The failure mode: If the class already has a $meta that does not inherit from the new $metaclass, the current code will happily ignore the new $metaclass. For example, if My::Meta and My::Meta2 both extend Moose::Meta::Class, and if I create a class with My::Meta, then call init_meta with metaclass => 'My::Meta2', init_meta will silently ignore my request to initialize the metaclass.
On Wed Oct 12 17:39:46 2011, timk wrote: Show quoted text
> Observed via code inspection, I believe the following is a typo, in > Moose.pm line 165 ff: > > unless ( $meta->isa("Moose::Meta::Class") ) { > my $error_message = "$class already has a metaclass, but > it does not inherit > $metaclass ($meta)."; > > I believe the condition in the first line ought to read: $meta-
> >isa($metaclass). Usually won't
> cause a problem, since usually $metaclass eq "Moose::Meta::Class".
If you could write a test for this, that'd be fantastic.