# Because Mouse::Util is loaded first in all the Mouse sub-modules,
# XS loader is placed here, not in Mouse.pm.
- our $VERSION = '0.40_08';
+ our $VERSION = '0.45';
my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL});
Mouse::Util->import({ into => 'Mouse::Meta::Method::Destructor::XS' }, ':meta');
Mouse::Util->import({ into => 'Mouse::Meta::Method::Accessor::XS' }, ':meta');
return 1;
- };
+ } || 0;
#warn $@ if $@;
}
*MOUSE_XS = sub(){ $xs };
}
-
use Carp ();
use Scalar::Util ();
*get_all_metaclass_names = \&Mouse::Meta::Module::_get_all_metaclass_names;
# is-a predicates
- generate_isa_predicate_for('Mouse::Meta::TypeConstraint' => 'is_a_type_constraint');
- generate_isa_predicate_for('Mouse::Meta::Class' => 'is_a_metaclass');
- generate_isa_predicate_for('Mouse::Meta::Role' => 'is_a_metarole');
+ #generate_isa_predicate_for('Mouse::Meta::TypeConstraint' => 'is_a_type_constraint');
+ #generate_isa_predicate_for('Mouse::Meta::Class' => 'is_a_metaclass');
+ #generate_isa_predicate_for('Mouse::Meta::Role' => 'is_a_metarole');
+
+ # duck type predicates
+ generate_can_predicate_for(['_compiled_type_constraint'] => 'is_a_type_constraint');
+ generate_can_predicate_for(['create_anon_class'] => 'is_a_metaclass');
+ generate_can_predicate_for(['create_anon_role'] => 'is_a_metarole');
}
our $in_global_destruction = 0;
# See also MRO::Compat::__get_linear_isa.
$get_linear_isa = sub ($;$){
my($classname, $type) = @_;
+ package # hide from PAUSE
+ Class::C3;
if(!defined $type){
- package Class::C3;
our %MRO;
$type = exists $MRO{$classname} ? 'c3' : 'dfs';
}
return $type eq 'c3'
- ? [Class::C3::calculateMRO($classname)]
+ ? [calculateMRO($classname)]
: $_get_linear_isa_dfs->($classname);\r
};
}
sub is_class_loaded;
-
sub apply_all_roles {
my $applicant = Scalar::Util::blessed($_[0])
? shift # instance
return join q{, }, @items, "and $tail";
}
-
# common utilities
sub not_supported{
*does = \&does_role; # alias
1;
-
__END__
=head1 NAME
=head1 VERSION
-This document describes Mouse version 0.40_08
+This document describes Mouse version 0.45
=head1 IMPLEMENTATIONS FOR
=head3 C<get_code_info>
-=head1 UTILITIES FOR MOUSE
+=head1 Mouse specific utilities
=head3 C<not_supported>
+=head3 C<get_code_package>
+
+=head3 C<get_code_ref>
+
=head1 SEE ALSO
L<Moose::Util>