Parse::Method::Signatures::TypeConstraint - turn parsed TC data into Moose TC object


NAME

Parse::Method::Signatures::TypeConstraint - turn parsed TC data into Moose TC object


DESCRIPTION

Class used to turn PPI elements into the Moose::Meta::TypeConstraint manpage objects.


ATTRIBUTES

tc

Lazy Build.

The the Moose::Meta::TypeConstraint manpage object for this type constraint, built when requested. tc_callback will be called for each individual component type in turn.

tc_callback

Type: CodeRef

Default: find_registered_constraint

Callback used to turn type names into type objects. See type_constraint_callback in the Parse::Method::Signatures manpage for more details and an example.

from_namespace

Type: ClassName

If provided, then the default tc_callback will search for the MooseX::Types manpage in this package.


METHODS

find_registered_constraint

Will search for an imported the MooseX::Types manpage in from_namespace (if provided). Failing that it will ask the the Moose::Meta::TypeConstraint::Registry manpage for a type with the given name.

If all else fails, it will simple return the type as a string, so that Moose's auto-vivification of classnames to type will work.

to_string

String representation of the type constraint, approximately as parsed.


SEE ALSO

the Parse::Method::Signatures manpage, the MooseX::Types manpage, the MooseX::Types::Util manpage.


AUTHORS

Florian Ragwitz <rafl@debian.org>.

Ash Berlin <ash@cpan.org>.


LICENSE

Licensed under the same terms as Perl itself.

 Parse::Method::Signatures::TypeConstraint - turn parsed TC data into Moose TC object