Fix a comment in the typo
[gitmo/Moose.git] / lib / Moose / Meta / Class.pm
index 36e115c..06272bc 100644 (file)
@@ -11,11 +11,11 @@ use List::Util qw( first );
 use List::MoreUtils qw( any all uniq );
 use Scalar::Util 'weaken', 'blessed';
 
-our $VERSION   = '0.61';
+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;
 
@@ -90,8 +90,8 @@ sub create_anon_class {
     
     # 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}) {
@@ -186,7 +186,7 @@ sub construct_instance {
     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()) {
@@ -212,7 +212,7 @@ sub add_override_method_modifier {
     (!$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
@@ -238,7 +238,7 @@ sub _find_next_method_by_name_which_is_not_overridden {
     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;
 }
@@ -379,7 +379,7 @@ sub _find_common_ancestor {
 
     # 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?
 
@@ -514,7 +514,7 @@ sub _process_inherited_attribute {
     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);
     }
@@ -807,7 +807,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>