in reply to Re^3: Use Storable for storing XML::LibXML object
in thread Use Storable for storing XML::LibXML object

Thanks very much for your help. After some tweaking it seems to work. I've ended up with this code:

sub XML::LibXML::Element::STORABLE_freeze { shift->toString } sub XML::LibXML::Element::STORABLE_attach { 'XML::LibXML'->load_xml(string => pop)->documentElement }