| 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
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||