Thread Storable vs Data::Dumper (17 answers)
Opened by esskar at 2005-02-16 23:55

ptk
 2005-02-17 12:29
#51811 #51811
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
Ich habe mal ein Dokument angefangen, in dem CPAN-Module miteinander verglichen werden. Zu Serialisierungs-Modulen steht da:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
=head1 Serialization

L<YAML> is neat: it's human readable, portable across languages, but
unfortunately the Perl implementation is buggy so that's unusable
(other than for configuration files).

L<Storable> is in the core since 5.7.3. It's fast (because implemented
in XS and using a binary format), but it's not human readable. The
file format is forward compatible and the module versions are backward
compatible, which means you can read all Storable-generated files with
a recent Storable version, but only a Storable file generated by an
old version can be read by all Storable versions. Storable has neat
features like customizable per-class hooks and the ability to
(de)serialize code references.

L<Data::Dumper> is in the core since 5.005. The output is
human-readable as it's perl code. Data::Dumper comes with an optional
XS part, but has also a pure-perl part. Deserializing is done through
eval() which is probably dangerous, Safe::reval should be preferred.
Deserializing is a little bit unhandy. Data::Dumper is also able to
serialize code references.

L<Data::Dump::Streamer> is maybe worthwhile to take a look on XXX.

L<Data::Denter> is a predecessor of YAML.

L<Data::Serializer> is a meta class for handling a couple of
serialization methods together with encryption, compression and
checksumming.

View full thread Storable vs Data::Dumper