Thank you all for your answers. Yossi
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gaal Yahas Sent: Wednesday, February 21, 2007 9:39 AM To: Perl in Israel Subject: Re: [Israel.pm] Dumping in Perl On Wed, Feb 21, 2007 at 08:49:59AM +0200, Yossi Itzkovich wrote: > I know at least 2 ways to dump data structures in Perl, and then > "undump" it (A.K.A serialization/Marshaling): > Data::Dumper > YAML > dumpValue (dump only) > > Are there additional good alternatives? > What are the pros/cons for each one? If you use Storable (which is a good choice where speed matters), please remember to use the portable C<nstore> method. YAML has more than one implementation; YAML::Syck is much faster (and probably closer to spec, too). To write code that transparently uses whichever module is installed on the user's system, you can use Best: use Best qw/YAML::Syck YAML/; # http://search.cpan.org/dist/Best/ You can use Data::Serializer to abstract over serialization methods. If you do this, you can very easily switch around and see what's applicatively ideal for you: http://search.cpan.org/dist/Data-Serializer/ -- Gaal Yahas <[EMAIL PROTECTED]> http://gaal.livejournal.com/ _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
