s/_generate_isa_predicte_for/generate_isa_predicate_for/; it's Mouse specific anyway.
gfx [Sat, 31 Oct 2009 04:10:22 +0000 (13:10 +0900)]
lib/Mouse/PurePerl.pm
lib/Mouse/Util.pm
lib/Mouse/Util/TypeConstraints.pm
xs-src/Mouse.xs
xs-src/mouse_type_constraint.xs

index 0faa17c..b2c4b67 100644 (file)
@@ -76,7 +76,7 @@ sub get_code_ref{
     return *{$package . '::' . $name}{CODE};
 }
 
-sub _generate_isa_predicate_for {
+sub generate_isa_predicate_for {
     my($for_class, $name) = @_;
 
     my $predicate = sub{ Scalar::Util::blessed($_[0]) && $_[0]->isa($for_class) };
index d117bd2..2674aeb 100644 (file)
@@ -75,9 +75,9 @@ 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');
 }
 
 
index 404cb36..be2ddaf 100644 (file)
@@ -155,7 +155,7 @@ sub class_type {
     my $class = $options->{class} || $name;
     return _create_type 'subtype', $name => (
         as           => 'Object',
-        optimized_as => Mouse::Util::_generate_isa_predicate_for($class),
+        optimized_as => Mouse::Util::generate_isa_predicate_for($class),
 
         type => 'Class',
     );
index 59070e4..137e5a0 100644 (file)
@@ -87,7 +87,7 @@ OUTPUT:
     RETVAL
 
 void
-_generate_isa_predicate_for(SV* klass, const char* predicate_name = NULL)
+generate_isa_predicate_for(SV* klass, const char* predicate_name = NULL)
 PPCODE:
 {
     STRLEN klass_len;
index 09e910e..729344e 100644 (file)
@@ -275,8 +275,6 @@ START_MY_CXT
 #define MG_klass_pv(mg)    ((mg)->mg_ptr)
 #define MG_klass_len(mg)   ((mg)->mg_len)
 
-static MGVTBL mouse_util_type_constraints_vtbl;
-
 const char*
 mouse_canonicalize_package_name(const char* name){