in reply to Re^3: XML::Twig to mysql totally lost
in thread XML::Twig to mysql totally lost

I am very new to this, from what the tutorial showed, i added it in, i didn't think i needed it either since it's a cron and not outputting but want to keep memory to a minimum consumption. Should i remove it? From what the code shows, is it for certain looping then clearing the previous parse after uploading to the database? want to make sure I'm on the right path.

Replies are listed 'Best First'.
Re^5: XML::Twig to mysql totally lost
by mirod (Canon) on Jul 15, 2011 at 10:04 UTC

    The purge in your handler releases the memory by deleting everything but the direct ancestors of the current element. The flush is used when you want to output the transformed XML, by using flush in handlers. Then you need to flush what remains in memory after you're done parsing. At least with old versions of the module, recent versions take care of this automatically.

    So the short answer is: yes you can delete it.