laziness, impatience, and hubris | |
PerlMonks |
SOAP::Lite, objects and global variablesby Pickwick (Beadle) |
on May 26, 2010 at 08:12 UTC ( [id://841687]=perlquestion: print w/replies, xml ) | Need Help?? |
Pickwick has asked for the wisdom of the Perl Monks concerning the following question: Hello all, I really need some help understanding the basics of SOAP::Lite and visibility of variables in perl in my environment. First, please let me explain my situation: We have a web application with a frontend and a backend programmed in perl. The frontend uses SOAP::Lite to communicate with the backend, which is provided as one package which directly get SOAP-calls dispatched to. The client in the frontend does not instanciate the package using new or stuff like that, it just calls methods which SOAP::Lite will route to the package. All application logic is implemented directly in that package. The server looks something like the following:
Because the target package does provide a new-method I always thought this one gets called before calling the method requested automatically by SOAP::Lite, but this doesn't seem to be the case. SOAP::Lite seems to recognize if a blessed object reference is provided by the calling client or not and just calls the method on class level. My problem now is that in one of the methods provided as a web service I have to make a recursive call to itself, while saving the fact that it called itself recursively. I have to save that because the function must not call itself again or it will end in an infinite loop. As I see it I have different options to achieve this:
Do you think that going the ways 2 and 3 is an acceptable solution? Thanks for any help.
Back to
Seekers of Perl Wisdom
|
|