Dumpvalue

use Dumpvalue;

Dumpvalue->new->dumpValue($store);

When used on the example from Class::Struct, this prints:

'Shoppe::addrs' => ARRAY(0x9c1d4)
   0  'Miskatonic University'
   1  'Innsmouth, Mass.'
'Shoppe::boss' => Manager=HASH(0xa5754)
   'Manager::name' => 'Prof L. P. Haitch'
   'Manager::salary' => 'madness'
   'Manager::started' => 'Sat Apr  1 16:18:13 2000'
'Shoppe::owner' => 'Abdul Alhazred'
'Shoppe::stock' => HASH(0xfdbb4)
   'books' => 208
   'charms' => 3
   'potions' => 'none'

This is another module to help display complex data. It's not so much meant for marshalling as it is for pretty printing. It's used by the Perl debugger's x command. As such, it offers a dizzying wealth of options to control the output format. It also provides convenient access to Perl's package symbol tables to dump out the contents of an entire package.

Get Programming Perl, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.