in reply to Handler communication in XML::Twig
Indeed you can pass closures to new.
Have a look at Simon Cozens' Achieving Closure, which explains the process in great detail.
Basically you can do this:
my $t= XML::Twig->new( twig_handlers => { foo => sub { my_handler( @_, + @HOGS) } }); # ... sub my_handler { my( $t, $elt, @HOGS)= @_; # I would probably pass \@HOGC though
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Handler communication in XML::Twig
by diotalevi (Canon) on Feb 12, 2004 at 17:45 UTC | |
by mirod (Canon) on Feb 12, 2004 at 17:53 UTC |