WebService::Raygun::Message - A message to be sent to raygun.io
use WebService::Raygun::Message; my $message = WebService::Raygun::Message->new( occurred_on => '2014-06-27T03:15:10+1300', error => "This is my error!", environment => { processor_count => 2, cpu => 34, architecture => 'x84', total_physical_memory => 3 }, request => HTTP::Request->new( POST => 'https://www.null.com', [ 'Content-Type' => 'text/html', ] ), ); # test stuff
You generally should not need to create instances of this class
This module assembles a request for raygun.io.
Time the error occurred. This can be either:
string
Should have format YYYY-mm-ddTHH:MM:SSz.
YYYY-mm-ddTHH:MM:SSz
Must be a valid datetime with timezone offset, eg 2014-06-30T04:30:30+100. Defaults to current time.
The error. Can be one of the following:
This could be the output of something like croak or die.
die
See WebService::Raygun::Message::Error for a list of supported exception types.
If possible, the other data types are converted to an instance of this class.
Accepts any one of the following:
A string containing an email (eg. test@test.com).
test@test.com
integer
HASHREF
Key/values should be a subset of the following:
{ identifier => "someidentifier", email => 'test@test.com', is_anonymous => 1|0|undef, full_name => 'Firstname Lastname', first_name => 'Firstname', uuid => '783491e1-d4a9-46bc-9fde-9b1dd9ef6c6e' }
All the fields are optional, however if uuid is not supplied, one will be generated automatically.
uuid
These will all be coerced into an object of type WebService::Raygun::Message::User.
A request object. See WebService::Raygun::Message::Request for a list of supported types.
See WebService::Raygun::Message::Environment.
Some data from the user.
Default is 200.
Converts a Perl hash to JSON.
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.