Amp-Client

 view release on metacpan or  search on metacpan

lib/Amp/DbPoolClient.pm  view on Meta::CPAN

    # nothing to do here since an existing connection is used
    return 1;
}

sub client {
    my $self = shift;
    # Check to see if an instance name was provided and setup the host/url
    $self->checkForRemotePoolConnection();
    # Setup the pool client
    my $client = REST::Client->new();
    $client->setTimeout($self->timeout);
    $client->addHeader('AMP-API-KEY', $self->config->key);
    $client->setHost($self->host);

    return $client;
}

sub checkForRemotePoolConnection {
    my $self = shift;
    if ($self->instanceName()) {
        # If not found by instance name, try the name field which is sometimes different



( run in 0.233 second using v1.01-cache-2.11-cpan-a5abf4f5562 )