DOKK / manpages / debian 12 / pdl / PDL::Doc::Perldl.3pm.en
Doc::Perldl(3pm) User Contributed Perl Documentation Doc::Perldl(3pm)

PDL::Doc::Perldl - commands for accessing PDL doc database from 'perldl' shell

This module provides a set of functions to access the PDL documentation database, for use from the perldl or pdl2 shells as well as the pdldoc command-line program.

Autoload files are also matched, via a search of the PDLLIB autoloader tree. That behavior can be switched off with the variable $PERLDL::STRICT_DOCS (true: don't search autoload tree; false: search the autoload tree.)

In the interest of brevity, functions that print module names (at the moment just "apropos" and "usage") use some shorthand notation for module names. Currently-implemented shorthands are

  • P:: (short for PDL::)
  • P::G:: (short for PDL::Graphics::)

To turn this feature off, set the variable $PERLDL::long_mod_names to a true value. The feature is assumed to be on for the purposes of this documentation.

 use PDL::Doc::Perldl; # Load all documentation functions

Regex search PDL documentation database

 apropos 'text'

 pdl> apropos 'pic'
 PDL::IO::Pic    P::IO::Pic  Module: image I/O for PDL
 grabpic3d       P::G::TriD  Grab a 3D image from the screen.
 rim             P::IO::Pic  Read images in most formats, with improved RGB handling.
 rpic            P::IO::Pic  Read images in many formats with automatic format detection.
 rpiccan         P::IO::Pic  Test which image formats can be read/written
 wim             P::IO::Pic  Write a pdl to an image file with selected type (or using filename extensions)
 wmpeg           P::IO::Pic  Write an image sequence (a (3,x,y,n) byte pdl) as an animation.
 wpic            P::IO::Pic  Write images in many formats with automatic format selection.
 wpiccan         P::IO::Pic  Test which image formats can be read/written

To find all the manuals that come with PDL, try

  apropos 'manual:'

and to get quick info about PDL modules say

  apropos 'module:'

You get more detailed info about a PDL function/module/manual with the "help" function

Internal routine to search docs database and autoload files

Internal interface to the PDL documentation searcher

Internal routine that finds and returns documentation in the PDL::AutoLoader path, if it exists.

You feed in a topic and it searches for the file "${topic}.pdl". If that exists, then the filename gets returned in a match structure appropriate for the rest of finddoc.

Prints usage information for a PDL function

 Usage: usage 'func'

   pdl> usage 'inner'
   inner           P::Primitive  Inner product over one dimension
   Signature: inner(a(n); b(n); [o]c())

prints signature of PDL function

 sig 'func'

The signature is the normal dimensionality of the function's arguments. Calling with different dimensions doesn't break -- it causes broadcasting. See PDL::PP and PDL::Broadcasting for details.

  pdl> sig 'outer'
    Signature: outer(a(n); b(m); [o]c(n,m))

Describe a perl and/or PDL variable or expression. Useful for determining the type of an expression, identifying the keys in a hash or a data structure, or examining WTF an unknown object is.

 Usage: whatis $var
        whatis <expression>

print documentation about a PDL function or module or show a PDL manual

In the case of multiple matches, the first command found is printed out, and the remaining commands listed, along with the names of their modules.

 Usage: help 'func'

 pdl> help 'PDL::Tutorials' # show the guide to PDL tutorials
 pdl> help 'PDL::Slices'    # show the docs in the PDL::Slices module
 pdl> help 'slice'          # show docs on the 'slice' function

provides information on the bad-value support of a function

And has a horrible name.

 badinfo 'func'

  pdl> badinfo 'inner'
  Bad value support for inner (in module PDL::Primitive)
      If "a() * b()" contains only bad data, "c()" is set bad. Otherwise "c()"
      will have its bad flag cleared, as it will not contain any bad values.
2023-04-27 perl v5.36.0