Prolog/TermList/Clause.pm

filter: Statementstmt 95.8% 23 / 24 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 86.4% 32 / 37 CC 4 SCAR 6.5
CC
4
Cov
93%
to_string
3.0
is_builtin
2.1
BEGIN
1.0
CRAP 1.9
« Prolog/TermList.pm ↑ Summary Prolog/Term/Number.pm »
1 package AI::Prolog::TermList::Clause;
2  
3 13 $REVISION = '$Id: Clause.pm,v 1.4 2005/08/06 23:28:40 ovid Exp $';
4 13 $VERSION = '0.1';
5  
6 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 13 ▶use base 'AI::Prolog::TermList';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 792 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
11  
12 # Term TermList
13 792 my $class = shift;
14 792 return $class->SUPER::new(@_);
15 }
16  
17 3 ▶sub to_string {
Subroutine to_string: called CC=3 SCAR=11.0
Pod undocumented
18 3 my $self = shift;
19 3 my ( $term, $next ) = ( $self->term, $self->next );
20 3 foreach ( $term, $next ) {
21 6 ▶ $_ = $_ ? $_->to_string : "null";
Branch: 1 branch
BranchTrueFalseTotal
$_ ? : 4 2 6
22 }
23 3 return sprintf "%s :- %s" => $term, $next;
24 }
25  
26 369 ▶sub is_builtin {
Subroutine is_builtin: called CC=2 SCAR=7.4
Pod undocumented
27 369 my $self = shift;
28 369 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 369 0 369
29 369 $self->{is_builtin} = shift;
30 369 return $self;
31 }
32 0 return $self->{is_builtin};
33 }
34  
35 13 1;
36  
37 __END__
« Prolog/TermList.pm ↑ Summary Prolog/Term/Number.pm »