[Israel.pm] Access control/usage log for a package

David Baird davidlbaird at gmail.com
Tue Oct 24 15:55:40 PDT 2006

Warning, this question is a reaction to this wonderful discovery that
someone wrote an AOP interface for Perl. So not having researched
anything, yet, could Aspect help me to write a generic error handler
for all my SOAP method calls done through SOAP::Lite? As many may
recall, I have a colorful relationship with SOAP::Lite. Currently, I
am doing something as ugly as this:


sub soap_assert {
return if not $soap->call->faultstring;
die $soap->call->faultstring;

Every method called through my $soap object is followed by the
soap_assert() function. Could I use Aspect to insert some Advice code
after every call. Internally, the method calls are captured by the
AUTOLOAD of SOAP::Lite, so would I be able to add code "after"
SOAP::Lite::AUTOLOAD, or would I have to capture every method call
even though they are actually written in the SOAP::Lite module?

Thank you,


More information about the Perl mailing list