API-Handle
view release on metacpan or search on metacpan
lib/API/Handle.pm view on Meta::CPAN
, lazy => 1
, default => sub {
require Nour::Config;
return new Nour::Config ( -base => 'config' );
}
);
has _printer => (
is => 'rw'
, isa => 'Nour::Printer'
, handles => [ qw/verbose debug info warn warning error fatal dumper/ ]
, required => 1
, lazy => 1
, default => sub {
my $self = shift;
my %conf = $self->config->{printer} ? %{ $self->config->{printer} } : (
timestamp => 1
, verbose => 1
, dumper => 1
, debug => 1
, pid => 1
lib/API/Handle/OpenX.pm view on Meta::CPAN
my $conf = $self->config;
$self->uri( $conf->{oauth}{api_url} );
# Uncomment this to view loaded configuration.
# $self->dumper( 'config', $conf );
# Steal UA from lib provided by OpenX.
my $oauth = new OX::OAuth ( $conf->{oauth} );
$oauth->login or carp $oauth->error;
$oauth->token or carp "no oauth token?";
$self->ua( $oauth->{_ua} );
# Put code that pre-empts API::Handle::BUILD before this $prev line.
$prev = $self->$next( @args );
# Put code that depends on API::Handle::BUILD after this $prev line.
# Setup match-spec vars for request_prepare.
my ( $scheme, $host, $path ) = $self->uri =~ /^(https?):\/\/([^\/]+)(\/.+)$/;
( run in 0.624 second using v1.01-cache-2.11-cpan-65fba6d93b7 )