Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pdl::dbg(3) [redhat man page]

Dbg(3)							User Contributed Perl Documentation						    Dbg(3)

NAME
PDL::Dbg - functions to support debugging of PDL scripts SYNOPSIS
use PDL; use PDL::Dbg; $c = $a->slice("5:10,2:30")->px->diagonal(3,4); PDL->px; DESCRIPTION
This packages implements a couple of functions that should come in handy when debugging your PDL scripts. They make a lot of sense while you're doing rapid prototyping of new PDL code, let's say inside the perldl shell. FUNCTIONS
px Print info about a piddle (or all known piddles) perldl> PDL->px perldl> $b += $a->clump(2)->px('clumptest')->sumover perldl> $a->px('%C (%A) Type: %T') This function prints some information about piddles. It can be invoked as a class method (e.g. "PDL->px" ) or as an instance method (e.g. "$pdl->px($arg)"). If invoked as a class method it prints info about all piddles found in the current package (excluding "my" variables). This comes in quite handy when you are not quite sure which pdls you have already defined, what data they hold , etc. "px" is supposed to support inheritance and prints info about all symbols for which an "isa($class)" is true. An optional string argument is interpreted as the package name for which to print sym- bols: perldl> PDL->px('PDL::Mypack') The default package is that of the caller. invoked as an instance method it prints info about that particular piddle if $PDL::debug is true and returns the pdl object upon completion. It accepts an optional string argument that is simply prepended to the default info if it doesn't contain a "%" character. If, however, the argument contains a "%" then the string is passed to the "info" method to control the format of the printed information. This can be used to achieve custom- ized output from "px". See the documentation of "PDL::info" for further details. The output of px will be determined by the default formatting string that is passed to the "info" method (unless you pass a string contain- ing "%" to px when invoking as an instance method, see above). This default string is stored in $PDL::Dbg::Infostr and the default output format can be accordingly changed by setting this variable. If you do this you should also change the default title string that the class method branch prints at the top of the listing to match your new format string. The default title is stored in the variable $PDL::Dbg::Title. For historical reasons "vars" is an alias for "px". vars Alias for "px" BUGS
There are probably some. Please report if you find any. Bug reports should be sent to the PDL mailing list perldl@jachw.hawaii.edu. AUTHOR
Copyright(C) 1997 Christian Soeller (c.soeller@auckland.ac.nz). All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is sepa- rated from the PDL distribution, the copyright notice should be included in the file. perl v5.8.0 2000-04-17 Dbg(3)

Check Out this Related Man Page

pdl2(3pm)						User Contributed Perl Documentation						 pdl2(3pm)

NAME
pdl2 - Simple shell (version 2) for PDL SYNOPSIS
Use PDL interactively: %> pdl2 pdl> $a = sequence(10) # or any other perl or PDL command pdl> print "$a = $a "; $a = [0 1 2 3 4 5 6 7 8 9] DESCRIPTION
The "pdl2" program, also known as the Perldl2 shell, is a second generation version of the original "perldl" 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. If you have Devel::REPL version 1.003011 or later, then "pdl2" will start with full functionality. If Devel::REPL is not installed or found then "pdl2" will print a warning and run the legacy "perldl" shell command instead. By default, command lines beginning with the default prompt of either "pdl2" or "perldl" (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. FUNCTIONS
do_print Toggle print-by-default on and off (default value: off) By default, "pdl2" 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. pdl> $a = pdl(3,2) pdl> do_print 1 pdl> $a = pdl(3,2) $PDL1 = [3 2]; pdl> do_print pdl> $a = pdl(3,2) VARIABLES
$PDL::toolongtoprint The maximal size pdls to print (defaults to 10000 elements). This is not just a "perldl" or "pdl2" variable but it is something that is usually needed in an interactive debugging session. SEE ALSO
perldl, Devel::REPL perl v5.14.2 2012-05-30 pdl2(3pm)
Man Page