| 1 | package Games::TicTacToe::Params; | ||||||||||
| 2 | |||||||||||
| 3 | 11 | $Games::TicTacToe::Params::VERSION = '0.24'; | |||||||||
| 4 | 11 | $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 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 11 | ▶ | use strict; use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 11 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 11 | ▶ | use Type::Library -base, -declare => qw(Board Player Players PlayerType Symbol Type); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 11 | ▶ | use Types::Standard qw(Str ArrayRef); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 11 | ▶ | use Type::Utils; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | |||||||||||
| 24 | 11 | class_type 'Board' , { class => 'Games::TicTacToe::Board' }; | |||||||||
| 25 | 11 | class_type 'Player', { class => 'Games::TicTacToe::Player' }; | |||||||||
| 26 | |||||||||||
| 27 | declare 'PlayerType', | ||||||||||
| 28 | as Str, | ||||||||||
| 29 | 17 | ▶ | where { (defined $_[0] && $_[0] =~ /^[H|C]$/i) }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 30 | 4 | ▶ | message { "isa check for 'PlayerType' failed." }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 31 | |||||||||||
| 32 | declare 'Players', | ||||||||||
| 33 | as ArrayRef[Player], | ||||||||||
| 34 | 1 | ▶ | message { "isa check for 'players' failed." }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 35 | |||||||||||
| 36 | declare 'Symbol', | ||||||||||
| 37 | as Str, | ||||||||||
| 38 | 9 | ▶ | where { (defined $_[0] && $_[0] =~ /^[X|O]$/i) }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 39 | 2 | ▶ | message { "isa check for 'symbol' failed." }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 40 | |||||||||||
| 41 | declare 'Type', | ||||||||||
| 42 | as Str, | ||||||||||
| 43 | 0 | ▶ | where { (defined $_[0] && $_[0] =~ /^[H|C]$/i) }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 44 | 0 | ▶ | message { "isa check for 'type' failed." }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 45 | |||||||||||
| 46 | =head1 DESCRIPTION | ||||||||||
| 47 | |||||||||||
| 48 | It is used internally by L<Games::TicTacToe>. | ||||||||||
| 49 | |||||||||||
| 50 | =head1 AUTHOR | ||||||||||
| 51 | |||||||||||
| 52 | Mohammad S Anwar, C<< <mohammad.anwar at yahoo.com> >> | ||||||||||
| 53 | |||||||||||
| 54 | =head1 REPOSITORY | ||||||||||
| 55 | |||||||||||
| 56 | L<https://github.com/manwar/Games-TicTacToe> | ||||||||||
| 57 | |||||||||||
| 58 | =head1 BUGS | ||||||||||
| 59 | |||||||||||
| 60 | Please report any bugs / feature requests to C<bug-games-tictactoe at rt.cpan.org> | ||||||||||
| 61 | or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-TicTacToe>. | ||||||||||
| 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<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-TicTacToe> | ||||||||||
| 78 | |||||||||||
| 79 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||
| 80 | |||||||||||
| 81 | L<http://annocpan.org/dist/Games-TicTacToe> | ||||||||||
| 82 | |||||||||||
| 83 | =item * CPAN Ratings | ||||||||||
| 84 | |||||||||||
| 85 | L<http://cpanratings.perl.org/d/Games-TicTacToe> | ||||||||||
| 86 | |||||||||||
| 87 | =item * Search CPAN | ||||||||||
| 88 | |||||||||||
| 89 | L<http://search.cpan.org/dist/Games-TicTacToe/> | ||||||||||
| 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<http://www.perlfoundation.org/artistic_license_2_0> | ||||||||||
| 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 | 11 | 1; # End of Games::TicTacToe::Params | |||||||||