namespace = Moose::Meta::Mixin
package = Moose::Meta::Object::Trait
package = Moose::Util::TypeConstraints::OptimizedConstraints
+package = Moose::Util::TypeConstraints::Builtins
directory = benchmarks
[SurgicalPodWeaver]
name of the variable to check, typically something like C<"$_"> or C<"$_[0]">.
The subroutine should return a code string suitable for inlining. You can
-assume that the check will be wrapped in parenthese when it is inlined.
+assume that the check will be wrapped in parentheses when it is inlined.
The inlined code should include any checks that your type's parent type's
do. For example, the C<Num> type's inlining sub looks like this:
'Moose::Meta::TypeConstraint::Parameterizable' => ['.+'],
'Moose::Meta::TypeConstraint::Parameterized' => ['.+'],
'Moose::Meta::TypeConstraint::Role' => [qw( equals is_a_type_of )],
- 'Moose::Meta::TypeConstraint::Union' =>
- [qw( compile_type_constraint coercion has_coercion)],
+ 'Moose::Meta::TypeConstraint::Union' => [
+ qw( compile_type_constraint
+ coercion
+ has_coercion
+ can_be_inlined
+ inline_environment )
+ ],
'Moose::Util' => ['add_method_modifier'],
'Moose::Util::MetaRole' => ['apply_metaclass_roles'],
'Moose::Util::TypeConstraints' => ['find_or_create_type_constraint'],
+ 'Moose::Util::TypeConstraints::Builtins' => ['.+'],
);
for my $module ( sort @modules ) {