in reply to Re^2: XML::Twig parsefile_inplace misunderstanding (xml_pp twig_handlers _all_ flush)
in thread XML::Twig parsefile_inplace misunderstanding

so the inplace options are valid only during the scope of the parse_inplace call?

UTSL :) its

select temp handle; parsefile; restore original handle; rename /backup;

So it can be used only with the on-the-fly processing style and not with the tree-processing one?

That is tree mode. If you change the flush to a print, you'll see lots and lots of duplicated output.

but i prefer to use the XML::Twig method for shortness and laziness.

short/lazy things are supposed to be easy/obvious to use, I think this one got kind of got away from mirod, but its not like I have better ideas, I mean come on :)

$twig->infile('file.xml') ->backup('.bak') ->tempout ->parseit ->replaceoriginalwithtemp