1Dbg(3)                User Contributed Perl Documentation               Dbg(3)
2
3
4

NAME

6       PDL::Dbg - functions to support debugging of PDL scripts
7

SYNOPSIS

9              use PDL;
10              use PDL::Dbg;
11
12              $c = $a->slice("5:10,2:30")->px->diagonal(3,4);
13              PDL->px;
14

DESCRIPTION

16       This packages implements a couple of functions that should come in
17       handy when debugging your PDL scripts. They make a lot of sense while
18       you're doing rapid prototyping of new PDL code, let's say inside the
19       perldl shell.
20

FUNCTIONS

22   px
23       Print info about a piddle (or all known piddles)
24
25           perldl> PDL->px
26           perldl> $b += $a->clump(2)->px('clumptest')->sumover
27           perldl> $a->px('%C (%A) Type: %T')
28
29       This function prints some information about piddles. It can be invoked
30       as a class method (e.g. "PDL->px" ) or as an instance method (e.g.
31       "$pdl->px($arg)"). If
32
33       invoked as a class method
34         it prints info about all piddles found in the current package
35         (excluding "my" variables). This comes in quite handy when you are
36         not quite sure which pdls you have already defined, what data they
37         hold , etc. "px" is supposed to support inheritance and prints info
38         about all symbols for which an "isa($class)" is true. An optional
39         string argument is interpreted as the package name for which to print
40         symbols:
41
42           perldl> PDL->px('PDL::Mypack')
43
44         The default package is that of the caller.
45
46       invoked as an instance method
47         it prints info about that particular piddle if $PDL::debug is true
48         and returns the pdl object upon completion. It accepts an optional
49         string argument that is simply prepended to the default info if it
50         doesn't contain a "%" character. If, however, the argument contains a
51         "%" then the string is passed to the "info" method to control the
52         format of the printed information. This can be used to achieve
53         customized output from "px". See the documentation of "PDL::info" for
54         further details.
55
56       The output of px will be determined by the default formatting string
57       that is passed to the "info" method (unless you pass a string
58       containing "%" to px when invoking as an instance method, see above).
59       This default string is stored in $PDL::Dbg::Infostr and the default
60       output format can be accordingly changed by setting this variable.  If
61       you do this you should also change the default title string that the
62       class method branch prints at the top of the listing to match your new
63       format string. The default title is stored in the variable
64       $PDL::Dbg::Title.
65
66       For historical reasons "vars" is an alias for "px".
67
68   vars
69       Alias for "px"
70

BUGS

72       There are probably some. Please report if you find any. Bug reports
73       should be sent to the PDL mailing list perldl@jachw.hawaii.edu.
74

AUTHOR

76       Copyright(C) 1997 Christian Soeller (c.soeller@auckland.ac.nz).  All
77       rights reserved. There is no warranty. You are allowed to redistribute
78       this software / documentation under certain conditions. For details,
79       see the file COPYING in the PDL distribution. If this file is separated
80       from the PDL distribution, the copyright notice should be included in
81       the file.
82
83
84
85perl v5.12.3                      2009-10-17                            Dbg(3)
Impressum