Data-Denter

 view release on metacpan or  search on metacpan

Denter.pod  view on Meta::CPAN

=head1 NAME

Data::Denter - An (deprecated) alternative to Data::Dumper and Storable.

=head1 NOTE NOTE NOTE

    use YAML; # Instead!!!

C<Data::Denter> was a good idea for many reasons. In May 2001, the
module got noticed by a couple of brilliant people who were working on a
project called YAML (YAML Ain't Markup Language). They asked me to join
them, and I did. Since then we have been working almost daily on this
new serialization language. For much more information, see
L<http://www.yaml.org>.

YAML has all the nice qualities that C<Data::Denter> does. You should
find that YAML actually improves upon C<Data::Denter> in both
readability and completeness. YAML's number one design goal is human
readability.

Another large benefit of YAML is that it is a programming language
independent serialization language. Implementations currently exist for
Perl, Python, Ruby and Java. In addition, YAML is unicode based, has
extensible typing and allows stream based processing.

C<Data::Denter> has served its purpose and is now being fully deprecated
in favor of C<YAML.pm>. I have made C<YAML.pm> a module prerequisite for
C<Data::Denter>, so if you used the CPAN shell to install
C<Data::Denter>, you may actually already have C<YAML.pm> installed. If
you really don't want YAML on your system, C<Data::Denter> will run fine
without it.

This final release of C<Data::Denter> contains all of the patches that
have been sent to me. If you really need this module patched further, I
will be happy to do so. But seriously consider switching to YAML.

=head1 SYNOPSIS

    use Data::Denter;
    use Data::Dumper;
    
    my $hh = bless {Easter => "Bunny", 
                    Christmas => ["Santa", "Grinch"],
                   }, "Holiday::Hackers";
    
    print "*** Data::Denter #1 ***\n";
    print Denter $hh;
    print "*** Data::Dumper #1 ***\n";
    print Dumper $hh;
    
    my $dented = Indent([ qw(one two three), {one=>1}, [2], \3 ], 
                        {"I\nLove\n" => undef});
    process($dented);
    
    sub process {
        my $dented = shift;
        my @data = Undent $dented;
        print "\n*** Data::Denter #2 ***\n";
        print $dented;
        print "*** Data::Dumper #2 ***\n";
        print Dumper @data;
    }

=head1 SYNOPSIS OUTPUT

    *** Data::Denter #1 ***
    %Holiday::Hackers
        Christmas => @
            Santa
            Grinch
        Easter => Bunny
    *** Data::Dumper #1 ***
    $VAR1 = bless( {
                     'Easter' => 'Bunny',
                     'Christmas' => [
                                      'Santa',
                                      'Grinch'
                                    ]
                   }, 'Holiday::Hackers' );
    
    *** Data::Denter #2 ***
    @
        one



( run in 3.670 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )