App-SFDC
view release on metacpan or search on metacpan
lib/App/SFDC/Role/Credentials.pm view on Meta::CPAN
default => 'https://login.salesforce.com';
option 'apiversion',
is => 'rw',
format => 'i',
default => 34;
option 'credfile',
doc => 'The file from which to read credentials.',
is => 'ro',
format => 's',
lazy => 1,
default => File::HomeDir->my_home."/.salesforce.properties",
isa => sub {
LOGDIE "The credentials file ".$_[0]." doesn't exist!"
unless -e $_[0];
};
option 'environment',
is => 'ro',
short => 'e',
format => 's';
has '_session',
lib/App/SFDC/Role/Credentials.pm view on Meta::CPAN
INFO "Reading options for $environment from "
. $self->credfile;
my %environments = %{
Config::Properties
->new(file => $self->credfile)
->splitToTree()
};
LOGDIE "Couldn't find credentials for $environment in "
.$self->credfile
unless $environments{$environment};
for (qw'username password url apiversion'){
if (exists($environments{$environment}->{$_})){
DEBUG "Setting $_ with ".$environments{$environment}->{$_}.".";
$self->$_($environments{$environment}->{$_});
}
}
lib/App/SFDC/Role/Credentials.pm view on Meta::CPAN
=head2 --password -p
=head2 --url
=head2 --apiversion
=head2 --credfile
A config file containing details of your enviroments, similar to the ant
deployment.properties file. For each environment, this file may specify the
credentials for that environment as:
envname.username = username@example.com
envname.password = PASSWORDthenTOKEN
envname.url = https://login.salesforce.com
sandboxname.username = username@example.com.sandbox
sandboxname.password = PASSWORDthenTOKEN
sandboxname.url = https://test.salesforce.com
By default, App::SFDC will look at ~/.salesforce.properties. This setting is
( run in 0.231 second using v1.01-cache-2.11-cpan-4d50c553e7e )