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

VERSION

9       version 2.2011
10

DESCRIPTION

12       This class represents type constraints based on an enumerated list of
13       required methods.
14

INHERITANCE

16       "Moose::Meta::TypeConstraint::DuckType" is a subclass of
17       Moose::Meta::TypeConstraint.
18

METHODS

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

BUGS

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

AUTHORS

46       ·   Stevan Little <stevan.little@iinteractive.com>
47
48       ·   Dave Rolsky <autarch@urth.org>
49
50       ·   Jesse Luehrs <doy@tozt.net>
51
52       ·   Shawn M Moore <code@sartak.org>
53
54       ·   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
55
56       ·   Karen Etheridge <ether@cpan.org>
57
58       ·   Florian Ragwitz <rafl@debian.org>
59
60       ·   Hans Dieter Pearcey <hdp@weftsoar.net>
61
62       ·   Chris Prather <chris@prather.org>
63
64       ·   Matt S Trout <mst@shadowcat.co.uk>
65
67       This software is copyright (c) 2006 by Infinity Interactive, Inc.
68
69       This is free software; you can redistribute it and/or modify it under
70       the same terms as the Perl 5 programming language system itself.
71
72
73
74perl v5.30.0                      2019-M0o7o-s2e6::Meta::TypeConstraint::DuckType(3)
Impressum