1Specio::Constraint::AnyUCsaenr(3C)ontributed Perl DocumeSnpteactiioo:n:Constraint::AnyCan(3)
2
3
4

NAME

6       Specio::Constraint::AnyCan - A class for constraints which require a
7       class name or object with a set of methods
8

VERSION

10       version 0.43
11

SYNOPSIS

13           my $type = Specio::Constraint::AnyCan->new(...);
14           print $_, "\n" for @{ $type->methods };
15

DESCRIPTION

17       This is a specialized type constraint class for types which require a
18       class name or object with a defined set of methods.
19

API

21       This class provides all of the same methods as
22       Specio::Constraint::Simple, with a few differences:
23
24   Specio::Constraint::AnyCan->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, "methods". This
36       must be an array reference of method names which the constraint
37       requires. You can also pass a single string and it will be converted to
38       an array reference internally.
39
40   $any_can->methods
41       Returns an array reference containing the methods this constraint
42       requires.
43

ROLES

45       This class does the Specio::Constraint::Role::IsaType,
46       Specio::Constraint::Role::Interface, and Specio::Role::Inlinable roles.
47

SUPPORT

49       Bugs may be submitted at
50       <https://github.com/houseabsolute/Specio/issues>.
51
52       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
53

SOURCE

55       The source code repository for Specio can be found at
56       <https://github.com/houseabsolute/Specio>.
57

AUTHOR

59       Dave Rolsky <autarch@urth.org>
60
62       This software is Copyright (c) 2012 - 2018 by Dave Rolsky.
63
64       This is free software, licensed under:
65
66         The Artistic License 2.0 (GPL Compatible)
67
68       The full text of the license can be found in the LICENSE file included
69       with this distribution.
70
71
72
73perl v5.28.1                      2018-10-26     Specio::Constraint::AnyCan(3)
Impressum