| 1 | package Net::Amazon::EC2::Error; | ||
| 2 | 2 | $Net::Amazon::EC2::Error::VERSION = '0.36'; | |
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Net::Amazon::EC2::Error | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | A class representing an EC2 API error. | ||
| 12 | |||
| 13 | =head1 ATTRIBUTES | ||
| 14 | |||
| 15 | =over | ||
| 16 | |||
| 17 | =item code (required) | ||
| 18 | |||
| 19 | The error code returned from the API request. | ||
| 20 | |||
| 21 | =item message (required) | ||
| 22 | |||
| 23 | The long form message about the error. | ||
| 24 | |||
| 25 | =cut | ||
| 26 | |||
| 27 | 2 | ▶ | use overload '""' => 'as_string'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | |||
| 29 | 2 | has 'code' => ( is => 'ro', isa => 'Str', required => 1 ); | |
| 30 | 2 | has 'message' => ( is => 'ro', isa => 'Str', required => 1 ); | |
| 31 | |||
| 32 | 0 | ▶ | sub as_string { |
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | 0 | my $self = shift; | |
| 34 | 0 | return '['.$self->code.'] '.$self->message; | |
| 35 | } | ||
| 36 | |||
| 37 | 2 | __PACKAGE__->meta->make_immutable(); | |
| 38 | |||
| 39 | =back | ||
| 40 | |||
| 41 | =head1 AUTHOR | ||
| 42 | |||
| 43 | Jeff Kim <cpan@chosec.com> | ||
| 44 | |||
| 45 | =head1 COPYRIGHT | ||
| 46 | |||
| 47 | Copyright (c) 2006-2010 Jeff Kim. This program is free software; you can redistribute it and/or modify it | ||
| 48 | under the same terms as Perl itself. | ||
| 49 | |||
| 50 | =cut | ||
| 51 | |||
| 52 | 2 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 53 | 2 | 1; | |