I think that is a bug. Every element remembers whether or not its parent has been previously flushed, and if it hasn't, then it prints the parent tag first. On the first "Aging", it thinks the Root hasn't been flushed yet, even though it really has because of the twig_print_outside_roots, so it doesn't need to print the root tag, but flushing "Aging" goes ahead and prints the root tag anyway. This is probably one for mirod to fix (Update: I'm not sure anymore if it is a bug...I don't think it is...use print instead of flush).

As a workaround hack, putting this right before the flush works (for now, probably at least until the module is fixed, so this is not really recommended as a permanent solution):

# (update: ignore this code) $balance->parent->_set_flushed;

Update: Instead of $balance->flush(\*OUTFILE) you should just $balance->print(\*OUTFILE).


In reply to Re^5: XML-Twig - AS5.6.1 vs AS 5.8.8 by runrig
in thread XML-Twig - AS5.6.1 vs AS 5.8.8 by drmikec

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.