Dump#

Dump one scalar’s internal representation to STDERR. The usual entry point for Devel::Peek; reaches for this first when you need to see what Perl has under the hood.

Dump($sv, $depth=4). $depth caps both recursion into nested references and the number of array/hash elements shown at each level; pass a larger value to see past the default cutoff. When called on @array or %hash directly, the aggregate itself is dumped (not its first element). Any other argument is evaluated in scalar rvalue context.

The dump layout follows the shape shown in the module summary: an SV = <type>(body) at <head> line, then REFCNT, FLAGS, and whichever of the IV / NV / PV / RV / array / hash slots are populated. Reference dumps nest a child SV = ... block inside the parent.

Two package variables tune the output:

  • $Devel::Peek::pv_limit — cap on characters printed per PV; 0 lifts the cap entirely.

  • $Devel::Peek::dump_ops — when true, CV-like scalars also print their op tree (see DumpWithOP for the scoped form).

Returns nothing; all output is on STDERR.