Revision history for Perl extension Moose
0.45
+ * Moose::Meta::Class
+ - added same 'add_package_symbol' fix as in
+ Class::MOP 0.56
+
+ * Moose::Util
+ - does_role now handles non-Moose classes
+ more gracefully
+ - added tests for this
+
* Moose::Meta::Method::Constructor
- fixed bug where trigger was not being
called by the inlined immutable
# prereqs
requires 'Scalar::Util' => $win32 ? '1.17' : '1.18';
requires 'Carp';
-requires 'Class::MOP' => '0.55';
+requires 'Class::MOP' => '0.56';
requires 'Sub::Name' => '0.02';
requires 'Sub::Exporter' => '0.972';
use Carp 'confess';
use Scalar::Util 'weaken', 'blessed', 'reftype';
-our $VERSION = '0.21';
+our $VERSION = '0.22';
our $AUTHORITY = 'cpan:STEVAN';
use Moose::Meta::Method::Overriden;
remove_method
add_attribute
remove_attribute
- add_package_symbol
remove_package_symbol
add_role
/],
get_method_map => 'SCALAR',
# maybe ....
calculate_all_roles => 'ARRAY',
- }
+ },
+ # NOTE:
+ # this is ugly, but so are typeglobs,
+ # so whattayahgonnadoboutit
+ # - SL
+ wrapped => {
+ add_package_symbol => sub {
+ my $original = shift;
+ confess "Cannot add package symbols to an immutable metaclass"
+ unless (caller(2))[3] eq 'Class::MOP::Package::get_package_symbol';
+ goto $original->body;
+ },
+ },
});
return $class;
}