Hello monks,

though I've been reading PM for quite a while it's the first time to ask a question now. Please forgive me if I post in a wrong section.

I'm trying to dump a Perl datastructure to a file in order to save on disc for
(a) reuse on subsequent runs of the scripts
(b) enable backups

Backups might be restored to a different mashine as well as moved between testing and live system.

In order not to reinvent any wheel I'm playing with XML::Dumper which works fine on my testing system.

Opposed to the docs the dumped structure contains memory_address="xxxx" attributes like this:

<perldata> <hashref memory_address="0x8634534"> <item key="COOKIE"> <arrayref memory_address="0x8634438"> <item key="0"> <hashref memory_address="0x862c4a4"> <item key="items"> <arrayref memory_address="0x862c48c"> </arrayref> </item> <item key="keys"> <arrayref memory_address="0x862c468"> <item key="0">name</item> </arrayref> </item> <item key="matchtype">non-empty</item> <item key="output_filter">2</item> </hashref> </item> bla...
Am I doing anything wrong calling XML::Dumper like this?
use XML::Dumper; my $xmlfile = 'filter.xml'; my $dump = new XML::Dumper; $dump->pl2xml( $input_filter, $xmlfile );
Question:
Assuming the dumped memory_address is an intended behaviour, will it have any (negative) effect if the dumped file is moved from one server to another (potentially different operating system) and used for rebuilding the Perl datastructure on the second mashine?

Any hint gladly appreciated.

Thx for reading.

RL


In reply to XML::Dumper - Dump to file cross-server safe? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.