DocRaptor
view release on metacpan or search on metacpan
lib/DocRaptor.pm view on Meta::CPAN
my $VERSION = '0.002000';
my $DOC_RAPTOR_URL = 'https://docraptor.com/docs';
my $USER_AGENT_STRING = 'doc_raptor-perl/'.$PRETTY_VERSION.' perl/'.sprintf( "%vd\n", $^V );
sub create
{
my $self = shift;
my $options = shift; # a DocRaptor::DocOptions object
my %request_options = $self->_coerce_options_to_request_format( $options );
$request_options{'user_credentials'} = $self->api_key;
my $request = POST( $DOC_RAPTOR_URL, [%request_options] );
return $self->_user_agent->request($request);
}
sub _user_agent
{
my $self = shift;
my $agent_string = $self->is_reporting_user_agent ? $USER_AGENT_STRING : '';
LWP::UserAgent->new( agent => $agent_string, ssl_opts => { verify_hostname => 0 } );
}
( run in 0.232 second using v1.01-cache-2.11-cpan-4d50c553e7e )