WebService::Raygun - Connect to the Raygun.io API
use WebService::Raygun::Messenger; sub some_post_action { my ( $self, $request ) = @_; eval { # do something with request # ... }; if ( my $exception = $@ ) { # see WebService::Raygun::Message for details # of request object. my $message = { error => $exception, request => $request user => 'null@null.com', client => { name => 'something', version => 2, clientUrl => 'www.null.com' }, }; # initialise raygun.io messenger my $raygun = WebService::Raygun::Messenger->new( api_key => '<your raygun.io api key>', message => $message ); # send message to raygun.io my $response = $raygun->fire_raygun; } }
Interface for the Raygun.io API. This is designed to send string or objects in $@ to raygun.io.
$@
Constructs the actual message. See this class for a better description of the fields available or required for the raygun.io API.
To install WebService::Raygun, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Raygun
CPAN shell
perl -MCPAN -e shell install WebService::Raygun
For more information on module installation, please visit the detailed CPAN module installation guide.