>>>>> "SB" == Steve Bertrand <st...@ipv6canada.com> writes:

  SB> On 2010.05.17 00:12, Shawn H Corey wrote:
  >> On 10-05-16 11:17 PM, Uri Guttman wrote:
  >>> it can be used to save data (e.g. a config
  >>> file) in a file for reloading in the future (via running the dumper
  >>> output with eval).
  >> 
  >> By saving the output of Data::Dumper to a *.pm file, it can be reloaded
  >> via "use".

  SB> Perhaps I completely missed something within the latter posts to this
  SB> thread, so I must ask...

  SB> ...why not:

  SB> use Storable;

  SB> ...to store temporary data? I understood what Uri said, but does
  SB> Storable not copy deep structures properly? Also, iirc, Storable is part
  SB> of the base now, yes?

it works and is used in serializing data. it usually is faster than
dumper too (i think it is partly in c). but there is a catch. it uses a
format that is with binary data and humans (well those coders who are
human) can't read or edit it. dumper's output is perl and can be read
and edited by humans. this can be a plus (or a minus) depending on your
views and needs. also dumper does output perl which even in other
situations can be more useful than some formats. there are situations
where you want to dump some data and generate code around it for later
execution with eval. and this is only one of dumper's uses that other
modules can do. debugging is still the main use of dumper.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to