WWW-SFDC
view release on metacpan or search on metacpan
lib/WWW/SFDC.pm view on Meta::CPAN
# SOAP::Lite dies when there's a connection error; if there's an API
# error it lives but $result->fault is set. This allows us to detect
# network errors and retry.
SOAP::Lite
->proxy($URL)
->readable(1)
->default_ns($NS)
->call(
$method,
@params,
SOAP::Header->name("SessionHeader" => {
"sessionId" => $self->loginResult->{"sessionId"}
})->uri($NS)
);
}
) {
return $result;
} elsif ($attempts) {
# Looping by recursion makes it easier to write this bit.
INFO "$method failed: $@";
lib/WWW/SFDC/Apex.pm view on Meta::CPAN
}
method executeAnonymous ($code, :$debug = 1) {
my $callResult = $self->_call(
'executeAnonymous',
SOAP::Data->name(string => $code),
(
$debug
? SOAP::Header->name('DebuggingHeader' => \SOAP::Data->name(
debugLevel => 'DEBUGONLY'
))->uri($self->uri)
: ()
),
);
return WWW::SFDC::Apex::ExecuteAnonymousResult->new(
_result => $callResult->result,
_headers => $callResult->headers
);
lib/WWW/SFDC/Tooling.pm view on Meta::CPAN
))->type($type)
} @_;
}
sub executeAnonymous {
my ($self, $code, %options) = @_;
my $result = $self->_call(
'executeAnonymous',
SOAP::Data->name(string => $code),
$options{debug} ? SOAP::Header->name('DebuggingHeader' => \SOAP::Data->name(
debugLevel => 'DEBUGONLY'
)) : (),
)->result;
LOGDIE "ExecuteAnonymous failed to compile: " . $result->{compileProblem}
if $result->{compiled} eq "false";
LOGDIE "ExecuteAnonymous failed to complete: " . $result->{exceptionMessage}
if $result->{success} eq "false";
( run in 0.649 second using v1.01-cache-2.11-cpan-454fe037f31 )