I want to have XML config files for an application that are really representations of Perl objects. For example, the Perl object might contain some scalars, references to other aggregated-in objects, and some arrays. I would like to be able to freeze/thaw (persist/restore, whatever) these objects as files, but instead of using Data::Dumper's Perl-eval-able format, I'd like to use XML. This way someone who understands XML (but not necessarily Perl) might be able to edit the XML file containing the object and maybe add a new element to a list, change a scalar string, etc. When the application was run again and the file was restored as an object, the new element(s) in the list would now be in the Perl object in memory.
I think XML::Simple would be misapplied here (it doesn't like to write out blessed hash refs passed to XMLout). I think I need something more industrial strength but so far my CPAN search has been fruitless. If this does not make sense, please ask for clarification. I'm a little tired now. TIA for your help, -A.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.