Returns a new instance of this with the same builtins and everything else reset.
Usage:
my $other_evaler = $this->new_instance();
Returns a shallow copy of this caller's stack.
my $caller_stack = $this->copy_caller();
Take a shallow copy of the current scope that is adequate for function and macro contexts
From a name and a value, creates a new Language::LispPerl::Var under the key 'name' in $this->current_scope();
$this->new_var( 'bla' , 1 );
Lookup the Language::LispPerl::Var by name in the current scope or in the current namespace. Returns undef if no such variable is found.
if( my $var = $this->var( 'blabla' ) ){ ... }
Returns the current file on the file_stack or '.' if no such thing exists.
Looks up the given file name (fully qualified, with clp extension or not) in this package's share directory or in @INC.
dies with an error if no file can be found.
$this->search_file('core');
Reads a file once if it hasn't been read before, for loading libraries in the global scope.
$this->load(/path/to/file.clp');
Reads and evaluates in this evaler all the expressions in the given filename and returns the last evaluation result.
$this->read('/path/to/file.clp');
Evaluates a string and returns the result of the latest expression (or dies with an error).
Return the nil/nil atom when the given string is empty.
my $res = $this->eval(q|( - 1 1 ) ( + 1 2 )|); # $res->value() is 3
Associate the current Language::LispPerl::Atom or Language::LispPerl::Seq with the correct Perl/Lisp space values.
Is the given word reserved? Usage:
if( $this->word_is_reserved('bla') ){ ... }
Turn a native perl Object into a new Language::LispPerl::Atom
my $new_atom = $evaler->perl2clj( .. perl object .. );
To install Language::LispPerl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::LispPerl
CPAN shell
perl -MCPAN -e shell install Language::LispPerl
For more information on module installation, please visit the detailed CPAN module installation guide.