my $soap_client = SOAP::Lite->proxy($proxy)
->uri($uri)
->on_fault(sub {...});
....
my $soap_value = SOAP::Data
->name($name)
->value($value)
->type($type);
and don't understand why is it pursued overall in the documentation at the expense of ordinary new:
my $soap_value = SOAP::Data->new(
'name' => $name,
'value' => $value,
'type' => $type);
But I think the SOAP::Lite style is different from the one discussed here.
AFAIK SOAP::Lite methods are overloaded as being:
- setters (when called on object with parameter)
- constructors (when called on package with parameter). They even can be imported sometimes as functions.
- getters (called without parameters)
but only the setter variant can be chained as it modifies the current object and returns it. So there are no new objects created by chained methods.
|