in reply to Mixing handlers with methods
# i'm assuming $self is actually defined here somewhere... my $twig = new XML::Twig( twig_handlers => { _all_ => sub { $self->proc_list(@_) }, }, );
addendum:
$ele is always empty inside proc_list.That's because in your code you're not passing the proc_list method, you're passing the result of calling $self->proc_list; which 1) is called before the XML::Twig object is even constructed, and 2) does not pass any arguments beside $self to proc_list.
|
|---|