NAME

pdla2 - Simple shell (version 2) for PDLA

SYNOPSIS

Use PDLA interactively:

  %> pdla2

  pdla> $a = sequence(10)  # or any other perl or PDLA command
  
  pdla> print "\$a = $a\n"; 
  $a = [0 1 2 3 4 5 6 7 8 9]

DESCRIPTION

The pdla2 program, also known as the Perldl2 shell, is a second generation version of the original perldla interactive PDLA shell. It attempts to be backward compatible in usage while providing improved features, better support for Perl syntax, and an more easily extended framework based on the Devel::REPL shell.

If you have Devel::REPL version 1.003011 or later, then pdla2 will start with full functionality. If Devel::REPL is not installed or found then pdla2 will print a warning and run the legacy perldla shell command instead.

By default, command lines beginning with the default prompt of either pdla2 or perldla (one of 'pdla> ', 'PDLA> ', or 'perldla> ') will have the prefix string and surrounding whitespace stripped. This allows for easy cut-and-paste from sample PDLA shell sessions or other examples into another PDLA shell session.

FUNCTIONS

do_print

Toggle print-by-default on and off (default value: off)

By default, pdla2 does not print the results of operations since the results can be very large (e.g., a small 640x480 RGBA image is still more than 1_000_000 elements). However, for experimenting and debugging more complex structures, it helps to see the results of every operation. The do_print routine allows you to toggle between the default "quiet" operation and a full Read, Evaluate, Loop style.

  pdla> $a = pdl(3,2)

  pdla> do_print
  1
  pdla> $a = pdl(3,2)
  $PDLA1 = [3 2];
  pdla> do_print

  pdla> $a = pdl(3,2)

VARIABLES

$PDLA::toolongtoprint

The maximal size pdls to print (defaults to 10000 elements). This is not just a perldla or pdla2 variable but it is something that is usually needed in an interactive debugging session.

SEE ALSO

perldla, Devel::REPL