use strict;
use warnings;
+our $VERSION = '0.66';
+$VERSION = eval $VERSION;
+our $AUTHORITY = 'cpan:STEVAN';
+
use List::MoreUtils qw( all );
my @Classes = qw( constructor_class destructor_class error_class );
my $for = $options{for_class};
- my %old_classes = map { $_ => $for->meta->$_ } @Classes;
+ my %old_classes
+ = map { $_ => $for->meta->$_ } grep { $for->meta->can($_) } @Classes;
my $meta = _make_new_metaclass( $for, \%options );
- for my $c (@Classes) {
+ for my $c ( grep { $meta->can($_) } @Classes ) {
if ( $options{ $c . '_roles' } ) {
my $class = _make_new_class(
$meta->$c(),
This utility module is designed to help authors of Moose extensions
write extensions that are able to cooperate with other Moose
extensions. To do this, you must write your extensions as roles, which
-can then be dynamically applyied to the caller's metaclasses.
+can then be dynamically applied to the caller's metaclasses.
This module makes sure to preserve any existing superclasses and roles
already set for the meta objects, which means that any number of
=head1 COPYRIGHT AND LICENSE
-Copyright 2008 by Infinity Interactive, Inc.
+Copyright 2009 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>