in reply to Module Data Dump.

If you are wanting to do this to learn, good for you. But if you are wanting to do something right, check out Gisle Aas's Data::DumpXML:
use strict; use Data::DumpXML qw(dump_xml); my $foo = Foo->new(); dump_xml($foo); package Foo; sub new { return bless { scalar => 'foobar', array => [('a'..'d')], hash => { bar => { baz => 'qux'}}, }, shift; }
If you want to know what methods a class provids, you can use UNIVERSAL::can():
package main; my $no = Bar->new(); print "yes\n" if $no->can('do'); package Bar; sub new { bless {},shift } sub do { print "cool\n" }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)