in reply to Referencing Subroutines through a package
If you want $ContentHandler->{'/'}->() to invoke the Event method on $self->{object}, you can use an anonymous subroutine like so:
ContentHandler => { '/' => sub {return $self->{object}->Event(@_)} }
By the way, calling an attribute object is probably a really bad idea.
|
|---|