Talk to the API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status


Perl interface to the Raygun API


use Try::Tiny;
use WebService::Raygun::Messenger;

sub some_code {
    my ( $self, $request ) = @_;
    try {
        # Code that throws an error.
    catch {
        my $exception = $_;

        # Initialise messenger
        my $raygun = WebService::Raygun::Messenger->new(
            api_key => '<your api key>',
            message => {
                error   => $exception,
                request => $request,
                user  => '',
        # send message to
        my $response = $raygun->fire_raygun;


Although this module should install without an API key from, you will need one for it to be of any use. By default, it uses whatever is in the RAYGUN_API_KEY environment variable, but this is mainly so that the tests can be run without any user interaction.