Hello Guys, I have a question on a twig module. Do you know the way to build the twig_handler with variables, I show you below what I would like to do
If you have any idea to do this . Many Thanks Nicolasmy $test = sub { $_->delete()}; my $node_to_delete = 'node1-node2-node3-node4'; my @tags = split('-', $node_to_delete ); // my objective with a foreach will be to get a varaible // my $handlers = {$tags[0] => $test, $tags[1] => $test ) my $twig = new XML::Twig( twig_handlers => { $twig_handlers,}); $twig->parsefile(*DATA);
In reply to TWig handler generation by nico38100
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |