Revision history for Perl extension Moose
-0.36
+0.36 Sat. Jan. 26, 2008
* Moose::Role
Moose::Meta::Attribute
- role type tests now support when roles are
applied to non-Moose classes (found by ash)
- added tests for this (thanks to ash)
+ - couple extra tests to boost code coverage
* Moose::Meta::Method::Constructor
- improved fix for handling Class::MOP attributes
-Moose version 0.35
+Moose version 0.36
===========================
See the individual module documentation for more information
sub add_attribute {
my $self = shift;
- $self->SUPER::add_attribute($self->_process_attribute(@_));
+ $self->SUPER::add_attribute(
+ (blessed $_[0] && $_[0]->isa('Class::MOP::Attribute')
+ ? $_[0]
+ : $self->_process_attribute(@_))
+ );
}
sub add_override_method_modifier {
my %ANON_CLASSES;
sub _process_attribute {
- my $self = shift;
-
- return $_[0] if blessed $_[0] && $_[0]->isa('Class::MOP::Attribute');
-
+ my $self = shift;
my $name = shift;
my %options = ((scalar @_ == 1 && ref($_[0]) eq 'HASH') ? %{$_[0]} : @_);