tame1 has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a handy-dandy HOWTO for Data::Dumper::DumperX?

The perldoc isn't exactly clear, and I know what I need -
I always want my complex hash done up as a one line, one var ($VAR1 = )
text line. No \n's, no indents, etc. As I said, the perldoc is a little
shy on HOWTO type help.

What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

Replies are listed 'Best First'.
Re: DumperX
by tachyon (Chancellor) on Apr 08, 2002 at 20:43 UTC
    @struct = ( { foo => 'bar'}, [ 1,2,3 ], 4,5,6 ); use Data::Dumper; for $i (0..3) { $Data::Dumper::Indent = $i; print Dumper(\@struct),"\n\n"; }

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: DumperX
by ozone (Friar) on Apr 08, 2002 at 20:48 UTC
    { local $Data::Dumper::Indent = 0; Dumper($myVar); }

    Pretty much verbatim from the Data::Dumper perldoc.

Just remember, it's Dump, not dump :)
by RMGir (Prior) on Apr 08, 2002 at 21:23 UTC
    Just remember not to confuse Data::Dumper->Dump, and dump.

    I misremembered how to use Data::Dumper once, and wrote something like:

    use Data::Dumper; my $a; # build up complex thingy in $a # dump it out to try to debug what's wrong with it print dump($a);
    Took me quite a while to realize that Data::Dumper wasn't what was core dumping my program, the dump built-in was... :)
    --
    Mike