File Coverage

lib/AI/Prolog/Term/Cut.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 3 0.0
total 23 26 88.4


line stmt bran cond sub pod time code
1             package AI::Prolog::Term::Cut;
2             $REVISION = '$Id: Cut.pm,v 1.2 2005/02/20 18:27:55 ovid Exp $';
3             $VERSION = '0.1';
4             @ISA = 'AI::Prolog::Term';
5 13     13   9433 use strict;
  13         31  
  13         4118  
6 13     13   123 use warnings;
  13         24  
  13         411  
7              
8 13     13   72 use aliased 'AI::Prolog::Term';
  13         21  
  13         113  
9              
10             sub new {
11 17     17 0 55 my ($proto, $stack_top) = @_;
12 17         150 my $self = $proto->SUPER::new('!',0);
13 17         662 $self->{varid} = $stack_top;
14 17         59 return $self;
15             }
16              
17             sub to_string {
18 1     1 0 2 my $self = shift;
19 1         8 return "Cut->$self->{varid}";
20             }
21              
22             sub dup { # XXX recast as Term?
23 1     1 0 3 my $self = shift;
24 1         6 return $self->new($self->{varid});
25             }
26              
27             1;
28              
29             __END__