Parse::Method::Signatures::TypeConstraint(3pm)

Parse::Method::Signatures::TypeConstraint3pm

Turn parsed tc data into moose tc object

Overview

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

Attributes

tc

Lazy Build.

The Moose::Meta::TypeConstraint 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 Parse::Method::Signatures for more details and an example.

from_namespace

Type: ClassName

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

Methods

find_registered_constraint

Will search for an imported MooseX::Types in "from_namespace" (if provided). Failing that it will ask the Moose::Meta::TypeConstraint::Registry 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.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10–11
  6. 12–13

Authors

Florian Ragwitz <[email protected]>.

Ash Berlin <[email protected]>.

License

Licensed under the same terms as Perl itself.

From libparse-method-signatures-perl 1.003019-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.