Prolog/ChoicePoint.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 4 totaltotal 87.1% 27 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Prolog/TermList/Primitive.pm ↑ Summary Prolog/Term/Cut.pm »
1 package AI::Prolog::ChoicePoint;
2 14 $REVISION = '$Id: ChoicePoint.pm,v 1.5 2005/02/20 18:27:55 ovid Exp $';
3  
4 14 $VERSION = '0.02';
5 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 14 ▶use Hash::Util 'lock_keys';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 38 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
10 38 my ( $class, $goal, $clause ) = @_;
11 38 my $self = bless {
12 goal => $goal,
13 clause => $clause,
14 } => $class;
15 38 lock_keys %$self;
16 38 return $self;
17 }
18  
19 1 ▶sub goal { $_[0]->{goal} }
Subroutine goal: called CC=1 SCAR=0.0
Pod undocumented
20 2 ▶sub clause { $_[0]->{clause} }
Subroutine clause: called CC=1 SCAR=0.0
Pod undocumented
21  
22 1 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod undocumented
23 1 my $self = shift;
24 1 return " ||" . $self->clause->to_string . "|| ";
25 }
26  
27 14 1;
28  
29 __END__
« Prolog/TermList/Primitive.pm ↑ Summary Prolog/Term/Cut.pm »