in reply to XML::Twig - provide additional parameters to twig_roots handlers
I guess you are looking for 4.6 A simple HTML+ converter example.You can pass your $para to your function like this.
and use it in your functionXML::Twig->new( twig_roots => { 'div' => sub{ &div(@_,$para); }, } )->parsefile("my_file");
I hope I understand your intention...sub div { my ($t, $elt,$para) = @_; ...
|
|---|