Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: XML::Twig - provide additional parameters to twig_roots handlers

by Jenda (Abbot)
on Oct 03, 2012 at 19:00 UTC ( #997120=note: print w/ replies, xml ) Need Help??


in reply to Re^4: XML::Twig - provide additional parameters to twig_roots handlers
in thread XML::Twig - provide additional parameters to twig_roots handlers

The problem with adding own fields into the hashref is that you might unintentionally step over something. Or have an update to the module break your script, because the module starts using some key you added. That's why I specifically reserved $parser->{pad} as a place for user defined data attached to a parser and $parser->{parameters} as a place where you can find the additional parameter passed to the $parser->parse() call in XML::Rules.

Agreed on the closure being the cleanest way.

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^5: XML::Twig - provide additional parameters to twig_roots handlers
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997120]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-12-25 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls