1Moose::Meta::TypeConstrUasienrt:C:oDnutcrkiTbyuptee(d3M)Poeorsle:D:oMceutmae:n:tTaytpieoCnonstraint::DuckType(3)
2
3
4

NAME

6       Moose::Meta::TypeConstraint::DuckType - Type constraint for duck typing
7

DESCRIPTION

9       This class represents type constraints based on an enumerated list of
10       required methods.
11

INHERITANCE

13       "Moose::Meta::TypeConstraint::DuckType" is a subclass of
14       Moose::Meta::TypeConstraint.
15

METHODS

17       Moose::Meta::TypeConstraint::DuckType->new(%options)
18           This creates a new duck type constraint based on the given
19           %options.
20
21           It takes the same options as its parent, with several exceptions.
22           First, it requires an additional option, "methods". This should be
23           an array reference containing a list of required method names.
24           Second, it automatically sets the parent to the "Object" type.
25
26           Finally, it ignores any provided "constraint" option. The
27           constraint is generated automatically based on the provided
28           "methods".
29
30       $constraint->methods
31           Returns the array reference of required methods provided to the
32           constructor.
33
34       $constraint->create_child_type
35           This returns a new Moose::Meta::TypeConstraint object with the type
36           as its parent.
37
38           Note that it does not return a
39           "Moose::Meta::TypeConstraint::DuckType" object!
40

BUGS

42       See "BUGS" in Moose for details on reporting bugs.
43

AUTHOR

45       Chris Prather <chris@prather.org>
46
47       Shawn M Moore <sartak@gmail.com>
48
50       Copyright 2006-2010 by Infinity Interactive, Inc.
51
52       <http://www.iinteractive.com>
53
54       This library is free software; you can redistribute it and/or modify it
55       under the same terms as Perl itself.
56
57
58
59perl v5.12.2                      2010-M0o8o-s2e8::Meta::TypeConstraint::DuckType(3)
Impressum