[Israel.pm] Access control/usage log for a package
David Baird
davidlbaird at gmail.com
Wed Oct 25 01:25:24 EEST 2006
Warning, this question is a knee jerk 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 love-hate relationship with SOAP::Lite.
Currently, I am doing something as ugly as this:
$soap->method(params);
soap_assert();
sub soap_assert {
return if not $soap->call->faultstring;
DEBUG($soap->call->failstring;
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,
David
More information about the Perl
mailing list