oopnewb has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I have a SOAP::Lite server that is calls a method runProgram from Class Tool. This method calls a method getSeq from Class ExSeq and also calls a method runTool from Class BioTools. Finally, the method runTool calls a method program from Class Test. This is where things break down. The method runTool creates an object to Class Test and then proceeds to call a method run, but there doesn't seem to be a reference in $thingy at all!
#server calls method runProgram from class Tool dispatch_to(Tool::runProgram), etc... #method runProgram calls getSeq and runTool from classes ExSeq and Bio +Tools respectively package Program; use ExSeq; use BioTools; sub runProgram{ shift; my $ids = shift; my $exSeqObj = ExSeq->new(); my $file = $exSeqObj->getSeq($ids); my $bioToolsObj = BioTools->new(); my $hashref = $bioToolsObj->runTool($file); } #method runTool calls run from Class Bio in Class Test package Test; use Bio; sub runTool{ shift; my $file = shift; my $testObj = Bio->new(); my $thingy = $testObj->run($file); }

I have tested a script that replicates the SOAP::Lite server's call to the runProgram method and everything seems to work just fine. PLEASE help!! I have been stuck on this for a couple of days now and I can't figure out what I'm doing wrong in the OOP code... I've taken out the constructor methods for brevity.
Thanks so much.
Al

Replies are listed 'Best First'.
Re: SOAP::Lite or just an OOP problem?
by chromatic (Archbishop) on Sep 25, 2003 at 19:09 UTC

    Barring disk failures, strange magnetic fields, bad RAM, and gremlins eating bits of compiled Perl, I find it unlikely that OOP is failing. I suspect you're probably getting back undef from one of your method calls due to unforseen input. Put in some error checking and logging and you'll likely find that the argument you receive is not the argument you expected.