[Moose-commits] r7735 - Class-MOP/trunk/lib/Class/MOP
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Thu Feb 19 21:33:16 GMT 2009
Author: autarch
Date: 2009-02-19 13:33:15 -0800 (Thu, 19 Feb 2009)
New Revision: 7735
Modified:
Class-MOP/trunk/lib/Class/MOP/Class.pm
Log:
Clarify variable naming here
Modified: Class-MOP/trunk/lib/Class/MOP/Class.pm
===================================================================
--- Class-MOP/trunk/lib/Class/MOP/Class.pm 2009-02-19 21:14:43 UTC (rev 7734)
+++ Class-MOP/trunk/lib/Class/MOP/Class.pm 2009-02-19 21:33:15 UTC (rev 7735)
@@ -157,28 +157,29 @@
my @class_list = $self->linearized_isa;
shift @class_list; # shift off $self->name
- foreach my $class_name (@class_list) {
- my $meta = Class::MOP::get_metaclass_by_name($class_name) || next;
+ foreach my $superclass_name (@class_list) {
+ my $super_meta = Class::MOP::get_metaclass_by_name($superclass_name) || next;
# NOTE:
# we need to deal with the possibility
# of class immutability here, and then
# get the name of the class appropriately
- my $meta_type = ($meta->is_immutable
- ? $meta->get_mutable_metaclass_name()
- : ref($meta));
+ my $super_meta_type
+ = $super_meta->is_immutable
+ ? $super_meta->get_mutable_metaclass_name()
+ : ref($super_meta);
- ($self->isa($meta_type))
+ ($self->isa($super_meta_type))
|| confess $self->name . "->meta => (" . (ref($self)) . ")" .
" is not compatible with the " .
- $class_name . "->meta => (" . ($meta_type) . ")";
+ $class_name . "->meta => (" . ($super_meta_type) . ")";
# NOTE:
# we also need to check that instance metaclasses
# are compatibile in the same the class.
- ($self->instance_metaclass->isa($meta->instance_metaclass))
+ ($self->instance_metaclass->isa($super_meta->instance_metaclass))
|| confess $self->name . "->meta->instance_metaclass => (" . ($self->instance_metaclass) . ")" .
" is not compatible with the " .
- $class_name . "->meta->instance_metaclass => (" . ($meta->instance_metaclass) . ")";
+ $class_name . "->meta->instance_metaclass => (" . ($super_meta->instance_metaclass) . ")";
}
}
More information about the Moose-commits
mailing list