use List::MoreUtils qw( any all uniq );
use Scalar::Util 'weaken', 'blessed';
-our $VERSION = '0.62_01';
+our $VERSION = '0.72';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::Meta::Method::Overriden;
+use Moose::Meta::Method::Overridden;
use Moose::Meta::Method::Augmented;
use Moose::Error::Default;
# something like Super::Class|Super::Class::2=Role|Role::1
my $cache_key = join '=' => (
- join('|', sort @{$options{superclasses} || []}),
- join('|', sort @{$options{roles} || []}),
+ join('|', @{$options{superclasses} || []}),
+ join('|', sort @{$options{roles} || []}),
);
if ($cache_ok && defined $ANON_CLASSES{$cache_key}) {
my $meta_instance = $class->get_meta_instance;
# FIXME:
# the code below is almost certainly incorrect
- # but this is foreign inheritence, so we might
+ # but this is foreign inheritance, so we might
# have to kludge it in the end.
my $instance = $params->{'__INSTANCE__'} || $meta_instance->create_instance();
foreach my $attr ($class->compute_all_applicable_attributes()) {
(!$self->has_method($name))
|| $self->throw_error("Cannot add an override method if a local method is already present");
- $self->add_method($name => Moose::Meta::Method::Overriden->new(
+ $self->add_method($name => Moose::Meta::Method::Overridden->new(
method => $method,
class => $self,
package => $_super_package, # need this for roles
my ($self, $name) = @_;
foreach my $method ($self->find_all_methods_by_name($name)) {
return $method->{code}
- if blessed($method->{code}) && !$method->{code}->isa('Moose::Meta::Method::Overriden');
+ if blessed($method->{code}) && !$method->{code}->isa('Moose::Meta::Method::Overridden');
}
return undef;
}
# FIXME? This doesn't account for multiple inheritance (not sure
# if it needs to though). For example, is somewhere in $meta1's
- # history it inherits from both ClassA and ClassB, and $meta
+ # history it inherits from both ClassA and ClassB, and $meta2
# inherits from ClassB & ClassA, does it matter? And what crazy
# fool would do that anyway?
my ($self, $attr_name, %options) = @_;
my $inherited_attr = $self->find_attribute_by_name($attr_name);
(defined $inherited_attr)
- || $self->throw_error("Could not find an attribute by the name of '$attr_name' to inherit from", data => $attr_name);
+ || $self->throw_error("Could not find an attribute by the name of '$attr_name' to inherit from in ${\$self->name}", data => $attr_name);
if ($inherited_attr->isa('Moose::Meta::Attribute')) {
return $inherited_attr->clone_and_inherit_options(%options);
}
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>