IAM/Error.pm

filter: Statementstmt 87.5% 14 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 85.7% 18 / 21 CC 1 SCAR 2.2
CC
1
Cov
88%
as_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« IAM/Errors.pm ↑ Summary IAM/AccessKey.pm »
1 package Net::Amazon::IAM::Error;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 =head1 NAME
5  
6 Net::Amazon::IAM::Error
7  
8 =head1 DESCRIPTION
9  
10 A class representing one or more errors from an API request.
11  
12 =head1 ATTRIBUTES
13  
14 =over
15  
16 =item request_id (required)
17  
18 The ID of the request associated with this error.
19  
20 =item code (required)
21  
22 Error code
23  
24 =item message(required)
25  
26 Error message
27  
28 =cut
29  
30 1 ▶use overload '""' => 'as_string';
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 1 has 'code' => ( is => 'ro', isa => 'Str', required => 1 );
33 1 has 'message' => ( is => 'ro', isa => 'Str', required => 1 );
34 1 has 'request_id' => ( is => 'ro', isa => 'Str', required => 1 );
35  
36 =back
37  
38 =head2 as_string()
39  
40 Format error as single string.
41  
42 =over
43  
44 Returns error as string.
45  
46 =back
47  
48 =cut
49  
50 0 ▶sub as_string {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod documented
51 0 my $self = shift;
52 0 return '['.$self->code.'] '.$self->message;
53 }
54  
55 1 __PACKAGE__->meta->make_immutable();
56  
57 =head1 AUTHOR
58  
59 Jeff Kim <cpan@chosec.com>
60  
61 =head1 COPYRIGHT
62  
63 Copyright (c) 2006-2010 Jeff Kim. This program is free software; you can redistribute it and/or modify it
64 under the same terms as Perl itself.
65  
66 =cut
67  
68 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
69 1 1;
« IAM/Errors.pm ↑ Summary IAM/AccessKey.pm »