From: bob ackerman <[EMAIL PROTECTED]> > could someone explain how this syntax works? > does the call to member function 'proxy' return the object which is > then used to call function 'uri' which returns the object which is > used to call function 'hi' which returns the object which is used to > call method 'result'? > > use SOAP::Lite; > print SOAP::Lite > -> proxy('http://services.soaplite.com/hibye.cgi') > -> uri('http://www.soaplite.com/Demo') > -> hi() > -> result;
Yes, exactly. You could rewrite it as $obj1 = SOAP::Lite->proxy('http://services.soaplite.com/hibye.cgi'); $obj2 = $obj1->uri('http://www.soaplite.com/Demo'); $obj3 = $obj2->hi(); print $obj3->result; > and then what is this syntax?: > use SOAP::Lite +autodispatch => > uri => 'http://www.soaplite.com/Temperatures', > proxy => 'http://services.soaplite.com/temper.cgi'; > > i can't even guess. 1) The plus seems like it doesn't do anything. I don't know why did they put it there. 2) => is the same as a comma except for the fact that if the thing before => looks like a word it is "quoted". use SOAP::Lite 'autodispatch', 'uri', 'http://www.soaplite.com/Temperatures', 'proxy', 'http://services.soaplite.com/temper.cgi'; This loads the SOAP::Lite module and calls its import() function with parameters ('autodispatch', 'uri', 'http://www.soaplite.com/Temperatures', 'proxy', 'http://services.soaplite.com/temper.cgi') The import() function will install a handler into your package (if you don't know what a package is, assume it installs a handler FULLSTOP) that will catch all undefined functions and interpret them as SOAP remote method calls. See "Autoloading" in perldoc perlsub Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]