Re: Perl Serialize object as string



On Sun, Apr 6, 2008 at 2:33 PM, anthony brooke <esia168@xxxxxxxxx> wrote:
Thanks for the reply, I always thought that Dumper is used for debugging purposes, I will look at it deeper. Btw, what you mean by cyclic data ?
snip

Data::Dumper is often used to display the contents of a data structure
during debugging for precisely the same reason you want to use it: it
produces a string representation of the data structure. Cyclic (aka
self-referential) data structures contain one or more references to
themselves. The simplest example would be a scalar that contains a
reference to itself:

my $s;
$s = \$s;

Data::Dumper can handle them (if they aren't too large), but it can
eat a lot of memory and cpu doing so.

--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
.



Relevant Pages

  • Re: Zero Rreferences (was:Stupid Question)
    ... > method to ensuring that there are no references left? ... IF one does not need a complex data Structure, ... Primates DO IT! ...
    (perl.beginners)
  • Re: Process to modify multiple queries simultaneously
    ... hundreds of combo box references already in my end user form I simply added ... that references that Combo box. ... you lost me on data structure. ... "Jeff Boyce" wrote: ...
    (microsoft.public.access.queries)
  • Re: Why could a suspended thread leak?
    ... that is reachable even without the thread executing, ... longer any references to them) are still somehow reachable? ... I'm referring to objects reachable via some other data structure. ... Suspend() is that there's nothing that would let your code know what ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: copying hashes without references
    ... > to parse). ... I created a hash with the common attributes and tried to ... If you want to really copy the contents of a data structure ... instead of the references it contains, this is called a "deep copy". ...
    (comp.lang.perl.misc)
  • Re: hash question
    ... What you need is some tutorial on references. ... You can stuff any data structure you like into ... a hash using references (e.g. make a hash value ...
    (comp.lang.perl.misc)