From: gfx Date: Wed, 16 Dec 2009 08:37:19 +0000 (+0900) Subject: Switch to duck typing X-Git-Tag: 0.45~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a4ab70d0af178844599e0ccedea24a7f59f0338;p=gitmo%2FMouse.git Switch to duck typing --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index 37b615a..107f700 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -81,9 +81,14 @@ BEGIN { *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;