The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

new_instance

Returns a new instance of this with the same builtins and everything else reset.

Usage:

 my $other_evaler = $this->new_instance();

copy_caller

Returns a shallow copy of this caller's stack.

Usage:

 my $caller_stack = $this->copy_caller();

copy_current_scope

Take a shallow copy of the current scope that is adequate for function and macro contexts

new_var

From a name and a value, creates a new Language::LispPerl::Var under the key 'name' in $this->current_scope();

Usage:

 $this->new_var( 'bla' , 1 );

var

Lookup the Language::LispPerl::Var by name in the current scope or in the current namespace. Returns undef if no such variable is found.

Usage:

 if( my $var = $this->var( 'blabla' ) ){
   ...
 }

current_file

Returns the current file on the file_stack or '.' if no such thing exists.

search_file

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.

Usage:

  $this->search_file('core');

load

Reads a file once if it hasn't been read before, for loading libraries in the global scope.

Usage:

 $this->load(/path/to/file.clp');

read

Reads and evaluates in this evaler all the expressions in the given filename and returns the last evaluation result.

Usage:

 $this->read('/path/to/file.clp');

eval

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.

Usage:

 my $res = $this->eval(q|( - 1 1 ) ( + 1 2 )|);
 # $res->value() is 3

bind

Associate the current Language::LispPerl::Atom or Language::LispPerl::Seq with the correct Perl/Lisp space values.

word_is_reserved

Is the given word reserved? Usage:

 if( $this->word_is_reserved('bla') ){
   ...
 }

perl2clj

Turn a native perl Object into a new Language::LispPerl::Atom

Usage:

  my $new_atom = $evaler->perl2clj( .. perl object .. );