blib/lib/Google/Ads/Common/AuthError.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
as_string
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Copyright 2011, Google Inc. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14  
15 package Google::Ads::Common::AuthError;
16  
17 use strict;
18 use warnings;
19 use version;
20  
21 # The following needs to be on one line because CPAN uses a particularly hacky
22 # eval() to determine module versions.
23 use Google::Ads::Common::Constants; our $VERSION = ${Google::Ads::Common::Constants::VERSION};
24  
25 use Class::Std::Fast;
26  
27 # Class::Std-style attributes. Need to be kept in the same line.
28 my %message_of : ATTR(:name<message>);
29 my %code_of : ATTR(:name<code>);
30 my %content_of : ATTR(:name<content>);
31  
32 sub as_string : STRINGIFY {
33 my $self = shift;
34 return
35 sprintf("AuthError {\n message: %s\n code: %s\n" . " content: %s\n}",
36 $self->get_message(), $self->get_code(), $self->get_content());
37 }
38  
39 1;
40  
41 =pod
42  
43 =head1 NAME
44  
45 Google::Ads::Common::AuthError
46  
47 =head1 DESCRIPTION
48  
49 Captures authorization error information.
50  
51 =head1 ATTRIBUTES
52  
53 Each of these attributes can be set via
54 Google::Ads::Common::AuthError->new().
55 Alternatively, there is a get_ and set_ method associated with each attribute
56 for retrieving or setting them dynamically.
57  
58 =head2 message
59  
60 Holds the error message.
61  
62 =head2 code
63  
64 Holds the HTTP code associated to the error.
65  
66 =head2 content
67  
68 Holds the body of the error response.
69  
70 =head1 LICENSE AND COPYRIGHT
71  
72 Copyright 2012 Google Inc.
73  
74 Licensed under the Apache License, Version 2.0 (the "License");
75 you may not use this file except in compliance with the License.
76 You may obtain a copy of the License at
77  
78 http://www.apache.org/licenses/LICENSE-2.0
79  
80 Unless required by applicable law or agreed to in writing, software
81 distributed under the License is distributed on an "AS IS" BASIS,
82 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83 See the License for the specific language governing permissions and
84 limitations under the License.
85  
86 =head1 REPOSITORY INFORMATION
87  
88 $Rev: $
89 $LastChangedBy: $
90 $Id: $
91  
92 =cut