Language::Prolog::Types::Factory - Perl extension to construct Prolog types
use Language::Prolog::Types::Factory; print prolog_functor("hello",2,3,4); print prolog_list(3,4,5); etc.
Factory module for Prolog terms.
Implements a pluggable interface that lets the constructor functions be changed to use different implementations for the actual prolog terms.
This module should be rarely used, only when interfacing Perl with a different Prolog system if the default representations for Prolog terms are not adecuate.
This module implements a set of constructor functions for Prolog terms.
Internally the module use a factory object implementing new_nil, new_list, new_ulist, new_functor and new_variable. Look at Language::Prolog::Types::Internal for a real implementation of the factory interface.
new_nil
new_list
new_ulist
new_functor
new_variable
There is also some intelligency added to the consructors to automatically promote types to others more adecuate. i.e. a '.'/2 functor to a list or [] to nil.
Constructor functions are reexported from Language::Prolog::Types and you should use that module instead of this one.
returns nil term.
returns a prolog list containing terms <@terms>.
returns an unfinished list with terms @terms and tail $tail.
@terms
$tail
returns a functor with name $name and arguments @terms.
$name
return a new varaible with name $name
Is not a contructor but converts any perl construct $atom to an atom.
$atom
returns a prolog list formed by the ASCII values of $string.
$string
Language::Prolog::Types, Language::Prolog::Types::Internal and Language::Prolog::Types::Abstract.
Salvador Fandiño, <sfandino@yahoo.com>
Copyright 2002 by Salvador Fandiño
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Fandiño,'. Assuming CP1252
To install Language::Prolog::Types, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::Prolog::Types
CPAN shell
perl -MCPAN -e shell install Language::Prolog::Types
For more information on module installation, please visit the detailed CPAN module installation guide.