.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDL2 1p" .TH PDL2 1p 2024-04-25 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME pdl2 \- Simple shell (version 2) for PDL .SH SYNOPSIS .IX Header "SYNOPSIS" Use PDL interactively: .PP .Vb 1 \& %> pdl2 \& \& pdl> $x = sequence(10) # or any other perl or PDL command \& \& pdl> print "\e$x = $x\en"; \& $x = [0 1 2 3 4 5 6 7 8 9] \& \& pdl> with_time { print +($A\->matmult($B))\->info, "\en" } for 1..5; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`pdl2\*(C'\fR program, also known as the Perldl2 shell, is a second generation version of the original \f(CW\*(C`perldl\*(C'\fR interactive PDL 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. .PP If you have Devel::REPL version 1.003011 or later, then \f(CW\*(C`pdl2\*(C'\fR will start with full functionality. If Devel::REPL is not installed or found then \f(CW\*(C`pdl2\*(C'\fR will print a warning and run the legacy \f(CW\*(C`perldl\*(C'\fR shell command instead. .PP By default, command lines beginning with the default prompt of either \f(CW\*(C`pdl2\*(C'\fR or \f(CW\*(C`perldl\*(C'\fR (one of 'pdl> ', 'PDL> ', or \&'perldl> ') will have the prefix string and surrounding whitespace stripped. This allows for easy cut-and-paste from sample PDL shell sessions or other examples into another PDL shell session. .PP For shell-like \f(CW\*(C`Ctrl\-C\*(C'\fR handling, you need Sys::SigAction installed. .SH FUNCTIONS .IX Header "FUNCTIONS" .SS do_print .IX Subsection "do_print" Toggle print-by-default on and off (default value: off) .PP By default, \f(CW\*(C`pdl2\*(C'\fR 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 \fIevery\fR operation. The \&\f(CW\*(C`do_print\*(C'\fR routine allows you to toggle between the default "quiet" operation and a full Read, Evaluate, Loop style. .PP .Vb 1 \& pdl> $x = pdl(3,2) \& \& pdl> do_print \& 1 \& pdl> $x = pdl(3,2) \& $PDL1 = [3 2]; \& pdl> do_print \& \& pdl> $x = pdl(3,2) .Ve .SH VARIABLES .IX Header "VARIABLES" .ie n .IP $PDL::toolongtoprint 4 .el .IP \f(CW$PDL::toolongtoprint\fR 4 .IX Item "$PDL::toolongtoprint" The maximal size pdls to print (defaults to 10000 elements). This is not just a \f(CW\*(C`perldl\*(C'\fR or \f(CW\*(C`pdl2\*(C'\fR variable but it is something that is usually needed in an interactive debugging session. .SH "SEE ALSO" .IX Header "SEE ALSO" perldl, Devel::REPL