1Specio::Constraint::AnyUDsoeers(C3o)ntributed Perl DocumSepnetcaitoi:o:nConstraint::AnyDoes(3)
2
3
4
6 Specio::Constraint::AnyDoes - A class for constraints which require a
7 class name or an object that does a specific role
8
10 version 0.46
11
13 my $type = Specio::Constraint::AnyDoes->new(...);
14 print $type->role;
15
17 This is a specialized type constraint class for types which require a
18 class name or an object that does a specific role.
19
21 This class provides all of the same methods as
22 Specio::Constraint::Simple, with a few differences:
23
24 Specio::Constraint::AnyDoes->new( ... )
25 The "parent" parameter is ignored if it passed, as it is always set to
26 the "Defined" type.
27
28 The "inline_generator" and "constraint" parameters are also ignored.
29 This class provides its own default inline generator subroutine
30 reference.
31
32 This class overrides the "message_generator" default if none is
33 provided.
34
35 Finally, this class requires an additional parameter, "role". This must
36 be a single role name.
37
38 $any_isa->role
39 Returns the role name passed to the constructor.
40
42 This class does the Specio::Constraint::Role::DoesType,
43 Specio::Constraint::Role::Interface, Specio::Role::Inlinable, and
44 MooseX::Clone roles.
45
47 Bugs may be submitted at
48 <https://github.com/houseabsolute/Specio/issues>.
49
50 I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
51
53 The source code repository for Specio can be found at
54 <https://github.com/houseabsolute/Specio>.
55
57 Dave Rolsky <autarch@urth.org>
58
60 This software is Copyright (c) 2012 - 2020 by Dave Rolsky.
61
62 This is free software, licensed under:
63
64 The Artistic License 2.0 (GPL Compatible)
65
66 The full text of the license can be found in the LICENSE file included
67 with this distribution.
68
69
70
71perl v5.30.1 2020-03-14 Specio::Constraint::AnyDoes(3)