1Parse::Method::SignaturUesse:r:PCaornatmr(i3b)uted PerlPDaorcsuem:e:nMteatthioodn::Signatures::Param(3)
2
3
4

NAME

6       Parse::Method::Signatures::Param - a parsed parameter from a signature
7

ATTRIBUTES

9       All attributes of this class are read-only.
10
11   required
12       Is this parameter required (true) or optional (false)?
13
14   sigil
15       The effective sigil ('$', '@' or '%') of this parameter.
16
17   type_constraints
18           Type: Parse::Method::Signatures::TypeConstraint
19
20           Predicate: has_type_constraints
21
22       Representation of the type constraint for this parameter. Most commonly
23       you will just call "meta_type_constraint" and not access this attribute
24       directly.
25
26   default_value
27           Type: Str
28
29           Predicate: has_default_value
30
31       A string that should be eval'd or injected to get the default value for
32       this parameter. For example:
33
34        $name = 'bar'
35
36       Would give a default_value of "'bar'".
37
38   constraints
39           Type: ArrayRef[Str]
40
41           Predicate: has_constraints
42
43       "where" constraints for this type. Each member of the array a the
44       string (including enclosing braces) of the where constraint block.
45
46   param_traits
47           Type: ArrayRef[ Tupple[Str,Str] ]
48
49           Predicate: has_traits
50
51       Traits that this parameter is declared to have. For instance
52
53        $foo does coerce
54
55       would have a trait of
56
57        ['does', 'coerce']
58

METHODS

60   to_string
61   meta_type_constraint
62       Get the Moose::Meta::TypeConstraint for this parameter. Check first
63       that the type has a type constraint:
64
65        $tc = $param->meta_type_constraint if $param->has_type_constraints;
66

SEE ALSO

68       Parse::Method::Signatures.
69

AUTHORS

71       Ash Berlin <ash@cpan.org>.
72
73       Florian Ragwitz <rafl@debian.org>.
74

LICENSE

76       Licensed under the same terms as Perl itself.
77
78
79
80perl v5.36.0                      2022-07-22Parse::Method::Signatures::Param(3)
Impressum