| 1 | # Games::Checkers, Copyright (C) 1996-2012 Mikhael Goikhman, migo@cpan.org | ||||||||||||
| 2 | # | ||||||||||||
| 3 | # This program is free software: you can redistribute it and/or modify | ||||||||||||
| 4 | # it under the terms of the GNU General Public License as published by | ||||||||||||
| 5 | # the Free Software Foundation, either version 3 of the License, or | ||||||||||||
| 6 | # (at your option) any later version. | ||||||||||||
| 7 | # | ||||||||||||
| 8 | # This program is distributed in the hope that it will be useful, | ||||||||||||
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||
| 11 | # GNU General Public License for more details. | ||||||||||||
| 12 | # | ||||||||||||
| 13 | # You should have received a copy of the GNU General Public License | ||||||||||||
| 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||||||||||
| 15 | |||||||||||||
| 16 | package Games::Checkers::Constants; | ||||||||||||
| 17 | |||||||||||||
| 18 | 1 | ▶ | use Games::Checkers::DeclareConstant { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=3.8
| |||||||||||||
| 19 | Ok => 0, | ||||||||||||
| 20 | Err => 1, | ||||||||||||
| 21 | No => 0, | ||||||||||||
| 22 | Yes => 1, | ||||||||||||
| 23 | False => 0, | ||||||||||||
| 24 | True => 1, | ||||||||||||
| 25 | White => 0, | ||||||||||||
| 26 | Black => 1, | ||||||||||||
| 27 | Pawn => 0, | ||||||||||||
| 28 | King => 1, | ||||||||||||
| 29 | NL => -2, | ||||||||||||
| 30 | ML => -3, | ||||||||||||
| 31 | MIN_SCORE => -1e9, | ||||||||||||
| 32 | MAX_SCORE => +1e9, | ||||||||||||
| 33 | 0 | ▶ | DIE_WITH_STACK => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||
| 34 | 0 | for (my $i = 0; ; $i++) { | |||||||||||
| 35 | 0 | my ($package, $filename, $line, $subroutine) = caller($i); | |||||||||||
| 36 | 0 | ▶ | die "\n" unless defined $package; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 37 | 0 | $filename =~ s/.*\///; | |||||||||||
| 38 | 0 | ▶ | $subroutine = (caller($i+1))[3] || "(main)"; | ||||||||||
|
Condition0%0/2
(caller $i + 1)[3] || '(main)'
MC/DC0%0/1
(caller $i + 1)[3] || '(main)'
(caller $i + 1)[3]
Truth table0%0/2
A
A= (caller $i + 1)[3]
| |||||||||||||
| 39 | 0 | print "\t$filename, line $line, $subroutine\n"; | |||||||||||
| 40 | } | ||||||||||||
| 41 | }, | ||||||||||||
| 42 | 1 | }; | |||||||||||
| 43 | |||||||||||||
| 44 | 1 | 1; | |||||||||||