lib/Google/Ads/Common/CaptchaRequiredError.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 87.8% 29 / 33 CC 1 SCAR 1.3
CC
1
Cov
92%
as_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/Google/Ads/Common/AuthError.pm ↑ Summary blib/lib/Google/Ads/Common/XPathSAXParser.pm »
1 # Copyright 2012, 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::CaptchaRequiredError;
16  
17 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 9 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 9 ▶use base qw(Google::Ads::Common::AuthError);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # The following needs to be on one line because CPAN uses a particularly hacky
22 # eval() to determine module versions.
23 9 ▶use Google::Ads::Common::Constants; our $VERSION = ${Google::Ads::Common::Constants::VERSION};
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 9 ▶use Class::Std::Fast;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 # Class::Std-style attributes. Need to be kept in the same line.
28 9 my %token_of : ATTR(:name<token>);
29 9 my %image_of : ATTR(:name<image>);
30 9 my %url_of : ATTR(:name<url>);
31  
32 0 ▶sub as_string :STRINGIFY {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod undocumented
33 0 my $self = shift;
34 0 return sprintf("CaptchaRequiredError {\n token: %s\n image: %s\n" .
35 " url: %s\n message: %s\n code: %s\n content: %s\n}",
36 $self->get_token(), $self->get_image(), $self->get_url(),
37 $self->get_message(), $self->get_code(), $self->get_content());
38 9 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 9 1;
41  
42 =pod
43  
44 =head1 NAME
45  
46 Google::Ads::Common::CaptchaRequiredError
47  
48 =head1 DESCRIPTION
49  
50 Captures Captcha authorization required error information.
51  
52 =head1 ATTRIBUTES
53  
54 Each of these attributes can be set via
55 Google::Ads::Common::CaptchaRequiredError->new().
56 Alternatively, there is a get_ and set_ method associated with each attribute
57 for retrieving or setting them dynamically.
58  
59 =head2 token
60  
61 Captcha challenge token.
62  
63 =head2 image
64  
65 Holds the URL to the captcha image.
66  
67 =head2 url
68  
69 Holds the URL to unlock the challenge.
70  
71 =head1 LICENSE AND COPYRIGHT
72  
73 Copyright 2012 Google Inc.
74  
75 Licensed under the Apache License, Version 2.0 (the "License");
76 you may not use this file except in compliance with the License.
77 You may obtain a copy of the License at
78  
79 http://www.apache.org/licenses/LICENSE-2.0
80  
81 Unless required by applicable law or agreed to in writing, software
82 distributed under the License is distributed on an "AS IS" BASIS,
83 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
84 See the License for the specific language governing permissions and
85 limitations under the License.
86  
87 =head1 AUTHOR
88  
89 David Torres E<lt>api.davidtorres at gmail.comE<gt>
90  
91 =head1 REPOSITORY INFORMATION
92  
93 $Rev: $
94 $LastChangedBy: $
95 $Id: $
96  
97 =cut
« lib/Google/Ads/Common/AuthError.pm ↑ Summary blib/lib/Google/Ads/Common/XPathSAXParser.pm »