Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Clear questions and runnable code
get the best and fastest answer

Comment on


Well, the XML::Twig object is an old fashion hashref, and I have no plan to change this, so you can always add your own fields to it. Or use a "hidden" attribute (one which names starts with '#') to attach private data to any element, including the root.

A closure is the cleanest way to go though. It's not a trick, it's just a common idiom.

BTW, a google search on "XML::Twig passing data to handlers" (or using "arguments" instead of data) returns plenty of answers to that question.

In reply to Re^4: XML::Twig - provide additional parameters to twig_roots handlers by mirod

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (2)
    As of 2014-03-17 05:12 GMT
    Find Nodes?
      Voting Booth?

      Have you used a cryptocurrency?

      Results (340 votes), past polls