Johannes Ernst wrote:
I realize why it does that. I'm asking whether I can have something
higher-level that works for objects on the abstraction level where one
usually looks at an object.
Data::Dumper is designed to produce Perl source code that can be eval'd
to reconstruct the object. So
I realize why it does that. I'm asking whether I can have something
higher-level that works for objects on the abstraction level where
one usually looks at an object.
P.S. I would know, because it would say HASH instead of Some::Package.
On Feb 23, 2006, at 22:42, Octavian Rasnita wrote:
F
From: "Johannes Ernst" <[EMAIL PROTECTED]>
> That just changes the amount of whitespace. Here is an example of
> what I want:
>
> Some::Package {
> a => 'a value',
> b => 12,
> c => Other::Package {
> x => 34
> }
> }
>
Data::Dumper prints it exactly this way if $var is
That just changes the amount of whitespace. Here is an example of
what I want:
Some::Package {
a => 'a value',
b => 12,
c => Other::Package {
x => 34
}
}
instead of what Data::Dumper gives me, which seems to be:
p is $VAR1 = bless( [
bless( {
'c' => 3,
'a' =>
From: "Johannes Ernst" <[EMAIL PROTECTED]>
> PHP knows print_r -- which prints a data structure hierarchically,
> and is very useful for debugging.
> e.g.
> echo "Variable a is " . print_r( $a, true ) . "\n";
>
> Is there something similarly easy in Perl?
>
> It appears that Data::Dumper