WWW-SFDC
view release on metacpan or search on metacpan
lib/WWW/SFDC/Apex.pm view on Meta::CPAN
#!/usr/bin/env perl
package WWW::SFDC::Apex;
# ABSTRACT: Interface to the salesforce.com Apex SOAP Api
use 5.12.0;
use strict;
use warnings;
our $VERSION = '0.37'; # VERSION
use Log::Log4perl ':easy';
use Method::Signatures;
use SOAP::Lite;
use WWW::SFDC::Apex::ExecuteAnonymousResult;
use Moo;
with "WWW::SFDC::Role::SessionConsumer";
has 'uri',
is => 'ro',
default=> "http://soap.sforce.com/2006/08/apex";
sub _extractURL {
# NB that the // are part of the pattern
return $_[1]->{serverUrl} =~ s{/u/}{/s/}r;
}
sub compileAndTest () {
...
}
sub compileClasses {
...
}
sub compileTriggers {
...
}
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
);
}
sub runTests {
...
}
sub wsdlToApex {
...
}
1;
__END__
=pod
=head1 NAME
WWW::SFDC::Apex - Interface to the salesforce.com Apex SOAP Api
=head1 VERSION
version 0.37
=head1 METHODS
=head2 compileAndTest
=head2 compileClasses
=head2 compileTriggers
=head2 executeAnonymous
Returns a WWW::SFDC::Apex::ExecuteAnonymousResult containing the results of the
executeAnonymous call. You must manually check whether this succeeded.
=head2 runTests
=head2 wsdlToApex
=head1 WARNING
The only implemented method from the Apex API is currently executeAnonymous.
Without a solid use-case for the other methods, I'm not sure what the return
values of those calls should be.
If you want to implement those calls, please go ahead, constructing results
( run in 2.946 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )