4449SOAP::Lite tutorial comment
- Mar 3, 2005One of the problems my peers often point out against Perl is that
there are 25 different ways of doing things, from $$ to $PID.
from "key, value" to "key => value", etc.
So I say to them, that is Perl's strength...
However, I fail to see the author's motivation for using
object-message-sequencing approach in his SOAP::Lite's tutorials
and man pages. IMHO, the author should've chosen easy-perl
over cool-perl style.
Here is a typical example, keep in mind that we have
a novice user who is trying to learn a new technology but is
confronted with short cuts and idioms of a language.
-> result ;
I'll not bore you with the dereferencing operator and when
() should be used and when not and how white spaces are cleaned up
by the interpreter (including newline chars).
If it was me, I'd write my tutorials like this
my $soap = SOAP::Lite->new();
my $svc = $soap->service();
my $proxy = $svc->proxy();
my $response = $proxy->someMethod();
my $result = $response->result();
print "result = $result \n";
In my opinion, the $obj->method()->method()->method() chaining
while sexy is not debugable as any of the nodes along the way
could've given away. And the interpreter would say line x has problem
If there is some technical reason for coding like this, I'd like
to learn, other wise, may I ask the author to consider this input.
- Next post in topic >>