NAME

WWW::SFDC::Role::SessionConsumer - Provides a transparent interface to WWW::SFDC::SessionManager

VERSION

version 0.30

SYNOPSIS

package Example;
use Moo;
with "WWW::SFDC::Role::Session";

sub _extractURL {
  # this is a required method. $_[0] is self, as normal.
  # $_[1] is the loginResult hash, which has a serverUrl as
  # well as a metadataServerUrl defined.
  return $_[1]->{serverUrl};
}

# uri is a required property, containing the default namespace
# for the SOAP request.
has 'uri', is => 'ro', default => 'urn:partner.soap.salesforce.com';

sub doSomething {
  my $self = shift;
  # this uses the above-defined uri and url, and generates
  # a new sessionId upon an INVALID_SESSION_ID error:
  return $self->_call('method', @_);
}

1;

BUGS

Please report any bugs or feature requests at https://github.com/alexander-brett/WWW-SFDC/issues.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WWW::SFDC::Role::Session

You can also look for information at https://github.com/alexander-brett/WWW-SFDC

AUTHOR

Alexander Brett <alexander.brett@sophos.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Sophos Limited.

This is free software, licensed under:

The MIT (X11) License

The full text of the license can be found in the LICENSE file included with this distribution.