From: gfx Date: Sat, 31 Oct 2009 04:10:22 +0000 (+0900) Subject: s/_generate_isa_predicte_for/generate_isa_predicate_for/; it's Mouse specific anyway. X-Git-Tag: 0.40_04~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3540312c014bf730083fab1d0af13c002691115;p=gitmo%2FMouse.git s/_generate_isa_predicte_for/generate_isa_predicate_for/; it's Mouse specific anyway. --- diff --git a/lib/Mouse/PurePerl.pm b/lib/Mouse/PurePerl.pm index 0faa17c..b2c4b67 100644 --- a/lib/Mouse/PurePerl.pm +++ b/lib/Mouse/PurePerl.pm @@ -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) }; diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index d117bd2..2674aeb 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -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'); } diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 404cb36..be2ddaf 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -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', ); diff --git a/xs-src/Mouse.xs b/xs-src/Mouse.xs index 59070e4..137e5a0 100644 --- a/xs-src/Mouse.xs +++ b/xs-src/Mouse.xs @@ -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; diff --git a/xs-src/mouse_type_constraint.xs b/xs-src/mouse_type_constraint.xs index 09e910e..729344e 100644 --- a/xs-src/mouse_type_constraint.xs +++ b/xs-src/mouse_type_constraint.xs @@ -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){