package AI::Prolog::Term::Cut; $REVISION = '$Id: Cut.pm,v 1.2 2005/02/20 18:27:55 ovid Exp $'; $VERSION = '0.1'; @ISA = 'AI::Prolog::Term'; use strict; use warnings; use aliased 'AI::Prolog::Term'; sub new { my ($proto, $stack_top) = @_; my $self = $proto->SUPER::new('!',0); $self->{varid} = $stack_top; return $self; } sub to_string { my $self = shift; return "Cut->$self->{varid}"; } sub dup { # XXX recast as Term? my $self = shift; return $self->new($self->{varid}); } 1; __END__ =head1 NAME AI::Prolog::Term::Cut - Perl implementation of the Prolog cut operator. =head1 SYNOPSIS No user serviceable parts inside. You should never be seeing this. =head1 DESCRIPTION See L for more information. If you must know more, there are plenty of comments sprinkled through the code. =head1 SEE ALSO L L L W-Prolog: L X-Prolog: L Roman BartE<225>k's online guide to programming Prolog: L =head1 AUTHOR Curtis "Ovid" Poe, Emoc tod oohay ta eop_divo_sitrucE Reverse the name to email me. =head1 COPYRIGHT AND LICENSE Copyright 2005 by Curtis "Ovid" Poe This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut