API-Drip-Request
view release on metacpan or search on metacpan
lib/API/Drip/Request.pm view on Meta::CPAN
my $self = _load_conf( \%OPT );
# At this point, all configuration values should be set
foreach my $key ( keys %DEFAULTS ) {
confess "Missing configuration $key" unless defined $self->{$key};
}
$self->{debugger} = _mk_debugger( $self, %OPT );
bless $self, $class;
return $self;
}
sub _mk_debugger {
my ($self, %OPT) = @_;
unless ($self->{DRIP_DEBUG}) { return sub {}; }
if ( $OPT{debugger} ) { return $OPT{debugger} }
return sub { warn join "\n", map { ref($_) ? np $_ : $_ } @_ };
( run in 0.263 second using v1.01-cache-2.11-cpan-de7293f3b23 )