lib/Google/Ads/AdWords/FaultDetail.pm

filter: Statementstmt 65.7% 23 / 35 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 5 / 10 Podpod 0.0% 0 / 2 totaltotal 54.9% 28 / 51 CC 3 SCAR 14.1
CC
3
Cov
59%
AUTOMETHOD
12.0
get_xmlns
2.0
__get_attr_class
2.0
CRAP 4.1
« lib/Google/Ads/SOAP/Generator/Generator.pm ↑ Summary lib/Google/Ads/AdWords/Logging.pm »
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::AdWords::FaultDetail;
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
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 1 ▶use Google::Ads::AdWords::Constants; our $VERSION = ${Google::Ads::AdWords::Constants::VERSION};
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 1 ▶use Class::Std::Fast::Storable constructor => 'none';
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 1 __PACKAGE__->_set_element_form_qualified(1);
28  
29 0 ▶sub get_xmlns { 'http://schemas.xmlsoap.org/soap/envelope/' }
Subroutine get_xmlns: not called CC=1 SCAR=6.9
Pod undocumented
30  
31 1 our $XML_ATTRIBUTE_CLASS;
32 1 undef $XML_ATTRIBUTE_CLASS;
33  
34 0 ▶sub __get_attr_class {
Subroutine __get_attr_class: not called CC=1 SCAR=6.9
35 0 return $XML_ATTRIBUTE_CLASS;
36 }
37  
38 0 ▶sub AUTOMETHOD {
Subroutine AUTOMETHOD: not called CC=3 SCAR=24.8
Pod undocumented
39 0 my ($self, $ident) = @_;
40 0 my $method_name = $_;
41  
42 # Storing any exception into ApiExceptionFault property.
43 0 ▶ if ($method_name =~ /^(set_|add_)\w+$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($method_name =~ /^(set_|add_)\w+$/) 0 0 0
44 0 ▶ return sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
45 0 my ($self, $exception) = @_;
46 0 $self->set_ApiExceptionFault($exception);
47 0 };
48 }
49 # Retrieving any exception from the ApiExceptionFault property.
50 0 ▶ if ($method_name =~ /^(get_)\w+$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($method_name =~ /^(get_)\w+$/) 0 0 0
51 0 ▶ return sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
52 0 my ($self) = @_;
53 0 $self->get_ApiExceptionFault();
54 0 };
55 }
56 }
57  
58 { # BLOCK to scope variables
59  
60 1 my %ApiExceptionFault_of : ATTR(:get<ApiExceptionFault>);
61  
62 1 __PACKAGE__->_factory(
63 [qw(exception)],
64 {'ApiExceptionFault' => \%ApiExceptionFault_of},
65 {'ApiExceptionFault' => 'SOAP::WSDL::XSD::Typelib::ComplexType'},
66 {'ApiExceptionFault' => 'ApiExceptionFault'});
67  
68 } # end BLOCK
69  
70 1 1;
71  
72 =pod
73  
74 =head1 NAME
75  
76 Google::Ads::AdWords::FaultDetail
77  
78 =head1 SYNOPSIS
79  
80 Class that wraps API exceptions and it is accesible through
81 C<SOAP::WSDL::SOAP::Typelib::Fault11->get_detail()>.
82  
83 =head1 DESCRIPTION
84  
85 This class holds full API exception objects.
86  
87 =head1 ATTRIBUTES
88  
89 =head2 exception
90  
91 The API exception(s) object returned by the service.
92  
93 =head1 LICENSE AND COPYRIGHT
94  
95 Copyright 2011 Google Inc.
96  
97 Licensed under the Apache License, Version 2.0 (the "License");
98 you may not use this file except in compliance with the License.
99 You may obtain a copy of the License at
100  
101 http://www.apache.org/licenses/LICENSE-2.0
102  
103 Unless required by applicable law or agreed to in writing, software
104 distributed under the License is distributed on an "AS IS" BASIS,
105 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106 See the License for the specific language governing permissions and
107 limitations under the License.
108  
109 =head1 REPOSITORY INFORMATION
110  
111 $Rev: $
112 $LastChangedBy: $
113 $Id: $
114  
115 =cut
« lib/Google/Ads/SOAP/Generator/Generator.pm ↑ Summary lib/Google/Ads/AdWords/Logging.pm »