File Coverage

blib/lib/Games/TicTacToe/Params.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 27 27 100.0


line stmt bran cond sub pod time code
1             package Games::TicTacToe::Params;
2              
3             $Games::TicTacToe::Params::VERSION = '0.24';
4             $Games::TicTacToe::Params::AUTHOR = 'cpan:MANWAR';
5              
6             =head1 NAME
7              
8             Games::TicTacToe::Params - Placeholder for parameters for Games::TicTacToe.
9              
10             =head1 VERSION
11              
12             Version 0.24
13              
14             =cut
15              
16 11     11   146 use 5.006;
  11         34  
17 11     11   81 use strict; use warnings;
  11     11   23  
  11         186  
  11         44  
  11         21  
  11         276  
18 11     11   53 use Data::Dumper;
  11         23  
  11         545  
19              
20 11     11   3953 use Type::Library -base, -declare => qw(Board Player Players PlayerType Symbol Type);
  11         174031  
  11         107  
21 11     11   25810 use Types::Standard qw(Str ArrayRef);
  11         765311  
  11         122  
22 11     11   13692 use Type::Utils;
  11         38454  
  11         91  
23              
24             class_type 'Board' , { class => 'Games::TicTacToe::Board' };
25             class_type 'Player', { class => 'Games::TicTacToe::Player' };
26              
27             declare 'PlayerType',
28             as Str,
29             where { (defined $_[0] && $_[0] =~ /^[H|C]$/i) },
30             message { "isa check for 'PlayerType' failed." };
31              
32             declare 'Players',
33             as ArrayRef[Player],
34             message { "isa check for 'players' failed." };
35              
36             declare 'Symbol',
37             as Str,
38             where { (defined $_[0] && $_[0] =~ /^[X|O]$/i) },
39             message { "isa check for 'symbol' failed." };
40              
41             declare 'Type',
42             as Str,
43             where { (defined $_[0] && $_[0] =~ /^[H|C]$/i) },
44             message { "isa check for 'type' failed." };
45              
46             =head1 DESCRIPTION
47              
48             It is used internally by L.
49              
50             =head1 AUTHOR
51              
52             Mohammad S Anwar, C<< >>
53              
54             =head1 REPOSITORY
55              
56             L
57              
58             =head1 BUGS
59              
60             Please report any bugs / feature requests to C
61             or through the web interface at L.
62             I will be notified & then you'll automatically be notified of progress on your bug
63             as I make changes.
64              
65             =head1 SUPPORT
66              
67             You can find documentation for this module with the perldoc command.
68              
69             perldoc Games::TicTacToe::Params
70              
71             You can also look for information at:
72              
73             =over 4
74              
75             =item * RT: CPAN's request tracker
76              
77             L
78              
79             =item * AnnoCPAN: Annotated CPAN documentation
80              
81             L
82              
83             =item * CPAN Ratings
84              
85             L
86              
87             =item * Search CPAN
88              
89             L
90              
91             =back
92              
93             =head1 LICENSE AND COPYRIGHT
94              
95             Copyright (C) 2011 - 2016 Mohammad S Anwar.
96              
97             This program is free software; you can redistribute it and/or modify it under
98             the terms of the the Artistic License (2.0). You may obtain a copy of the full
99             license at:
100              
101             L
102              
103             Any use, modification, and distribution of the Standard or Modified Versions is
104             governed by this Artistic License.By using, modifying or distributing the Package,
105             you accept this license. Do not use, modify, or distribute the Package, if you do
106             not accept this license.
107              
108             If your Modified Version has been derived from a Modified Version made by someone
109             other than you,you are nevertheless required to ensure that your Modified Version
110             complies with the requirements of this license.
111              
112             This license does not grant you the right to use any trademark, service mark,
113             tradename, or logo of the Copyright Holder.
114              
115             This license includes the non-exclusive, worldwide, free-of-charge patent license
116             to make, have made, use, offer to sell, sell, import and otherwise transfer the
117             Package with respect to any patent claims licensable by the Copyright Holder that
118             are necessarily infringed by the Package. If you institute patent litigation
119             (including a cross-claim or counterclaim) against any party alleging that the
120             Package constitutes direct or contributory patent infringement,then this Artistic
121             License to you shall terminate on the date that such litigation is filed.
122              
123             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
124             CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
125             WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
126             NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
127             REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
128             INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
129             OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
130              
131             =cut
132              
133             1; # End of Games::TicTacToe::Params