Hello there monks,
I started using XML::Rabbit a couples of days ago and I quite content with it for reading XML configuration files.
I would like to add some optimization to the program by serializing the objects to the disk and avoid some memory consumption by recovering the values over and over from XML.
The problem is that XML::Rabbit objects do not hold the recovered values from XPath expression in classes attributes. I tried to use a naive approach with Storable but this is what I got from it:
c:\Temp>rabbit.pl Bizarre copy of UNKNOWN in subroutine entry at C:/Perl/site/lib/XML/Li +bXML/XPathContext.pm line 67. PmmREFCNT_dec: REFCNT decremented below 0 for 2ca1798! at C:/Perl/site +/lib/XML/LibXML/XPathContext.pm line 67. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe650! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe638! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe620! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe608! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe5d8! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe5a8! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe5c0! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cbe290! at C:/Perl/site +/lib/XML/LibXML.pm line 1549. PmmREFCNT_dec: REFCNT decremented below 0 for 2cdff18! at C:/Perl/site +/lib/XML/LibXML.pm line 1549.
Considering that XML::Rabbit is Moose based, what do you recommend to use for objects serialization? I thought about cloning the XML::Rabbit objects, saving the values as attributes and keeping the references as necessary, but this looks like a lot of trouble to do it.
Thanks,
In reply to enabling XML::Rabbit serialization by glasswalk3r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |