On Mon, Jan 09, 2012 at 05:42:39PM -0800, Toby Betts wrote:
> The issue seems to be that the arguments to be given to the callback are
> missing. Based on the XML::Twig docs, handlers are passed a self-referencing
> object called a twig and the element to handle, like so:

Yes, this is the issue. If you're wrapping a method call in a coderef
like that, you need to pass through the arguments yourself - the form
"sub { $self->method }" is only correct when the callback doesn't take
arguments. What you really want is "sub { $self->method(@_) }".

-doy

Reply via email to