Group
Extension

Matches 6

WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Message.pm ( view source; MetaCPAN )
s://metacpan.org/pod/WebService::Raygun'
    };
}

=head2 prepare_raygun

Converts a Perl hash to JSON.

=cut

sub prepare_raygun {
    my $self      = shift;
    my $formatter = DateTime::Format::Str
WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Message/Error/StackTrace.pm ( view source; MetaCPAN )
 => sub {
        return '';
    },
);

=head2 prepare_raygun

Prepare the data for conversion to JSON.

=cut

sub prepare_raygun {
    my $self = shift;
    return {
        lineNumber => $self->line
WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Message/Error.pm ( view source; MetaCPAN )
      return [];
    },
);

=head2 prepare_raygun

Prepare the error structure to be converted to JSON and sent to raygun.io.

=cut

sub prepare_raygun {
    my $self = shift;
    return {
        inn
WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Message/User.pm ( view source; MetaCPAN )
aygun> method may be called to retreive the structure in a form
that can be converted directly to JSON.


=head1 INTERFACE

=cut


use Data::GUID 'guid_string';
use Mouse::Util::TypeConstraints;

subt
WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Message/Environment.pm ( view source; MetaCPAN )
aygun> method may be called to retreive the structure in a form
that can be converted directly to JSON.


=head1 INTERFACE

=cut

use Filesys::DfPortable;
use Sys::Info;
use Sys::Info::OS;
use POSIX (
WebService-Raygun ( H/HE/HEYTRAV/WebService-Raygun-0.030.tar.gz, HEYTRAV, 2016; MetaCPAN )
WebService-Raygun/lib/WebService/Raygun/Messenger.pm ( view source; MetaCPAN )

C<RAYGUN_API_KEY> environment variable.

=cut

use LWP::UserAgent;
use URI;
use Mozilla::CA;
use JSON;

use WebService::Raygun::Message;

has api_key => (
    is       => 'rw',
    isa      => 'Str',
$ua      = $self->user_agent;
    my $json    = JSON->new->allow_nonref;
    my $jsoned  = $json->pretty->encode( $message->prepare_raygun );
    ### json : $jsoned
    my $req = HTTP::Request->new( P
req->header( 'Content-Type' => 'application/json' );
    $req->header( 'X-ApiKey'     => $api_key );
    $req->content($jsoned);
    ### json message : $jsoned;
    my $response = $ua->request($req);

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.