Marketing/ComplexType.pm

filter: Statementstmt 59.3% 19 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 6 / 12 Podpod 100% 2 / 2 totaltotal 56.2% 27 / 48 CC 3 SCAR 13.1
CC
3
Cov
56%
_new_from_hash
12.0
_type
2.0
user_setable_attributes
2.0
CRAP 3.7
↑ Summary Marketing.pm »
1 package Yahoo::Marketing::ComplexType;
2 # Copyright (c) 2009 Yahoo! Inc. All rights reserved.
3 # The copyrights to the contents of this file are licensed under the Perl Artistic License (ver. 15 Aug 1997)
4  
5 165 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 165 ▶use base qw/ Yahoo::Marketing::DateTimeAccessor Yahoo::Marketing /;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 165 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 165 ▶use Scalar::Util qw/ blessed /;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 165 ▶use SOAP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 =head1 NAME
15  
16 Yahoo::Marketing::ComplexType - a base class for complex types.
17  
18 =cut
19  
20 =head1 SYNOPSIS
21  
22 See L<http://searchmarketing.yahoo.com/developer/docs/V7/reference/dataObjects.php> for documentation of the various data objects.
23  
24 This module is not intended to be used directly. Documentation for each of the complex types is in the appropriate module.
25  
26 See perldoc Yahoo::Marketing::Account
27 ...::Ad
28 ...::AdEditorialReasons
29 ...::AdGroup
30 ...::AdGroupOptimizationGuidelines
31 ...::Address
32 ...::AmbiguousGeoMatch
33 ...::ApiFault
34 ...::Authorization
35 ...::BasicReportRequest
36 ...::BidInformation
37 ...::BucketType
38 ...::Campaign
39 ...::CampaignOptimizationGuidelines
40 ...::Capability
41 ...::ComplexType
42 ...::CreditCardInfo
43 ...::ErrorType
44 ...::ExcludedWord
45 ...::FileOutputFormat
46 ...::ForecastKeyword
47 ...::ForecastKeywordResponse
48 ...::ForecastRequestData
49 ...::ForecastResponse
50 ...::ForecastResponseData
51 ...::Keyword
52 ...::KeywordOptimizationGuidelines
53 ...::KeywordRejectionReasons
54 ...::MasterAccount
55 ...::PageRelatedKeywordRequestType
56 ...::PendingAd
57 ...::PendingKeyword
58 ...::RangeDefinitionRequestType
59 ...::RangeDefinitionResponseType
60 ...::RangeDefinitionType
61 ...::RangeValueType
62 ...::RelatedKeywordRequestType
63 ...::RelatedKeywordResponseType
64 ...::RelatedKeywordType
65 ...::ReportInfo
66 ...::ResponseStatusType
67 ...::Role
68 ...::Serializer
69 ...::SetGeographicLocationResponse
70 ...::Term
71 ...::User
72 ...::UserAuthorization
73  
74 =head2 user_setable_attributes
75  
76 Returns the name of all attributes that are not read-only in EWS
77  
78 =head2 read_only_attributes
79  
80 Returns the name of all attributes that are read-only in EWS
81  
82  
83  
84 =cut
85  
86  
87 0 ▶sub _type {
Subroutine _type: not called CC=1 SCAR=6.9
88 0 my $self = shift;
89  
90 0 return (split /::/, ref $self)[-1] ;
91 }
92  
93  
94 0 ▶sub _new_from_hash {
Subroutine _new_from_hash: not called CC=3 SCAR=24.8
95 0 my ( $self, $hash ) = @_;
96  
97 0 ▶ $self = $self->new unless blessed( $self ); # allow this to be called w/o new() first
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($self) 0 0 0
98  
99 0 my $obj_type = ref $self;
100  
101 0 my $new_obj = $obj_type->new;
102  
103 0 foreach my $key ( keys %$hash ){
104 0 $new_obj->$key( $hash->{ $key } );
105 }
106 0 return $new_obj;
107 }
108  
109 0 ▶sub user_setable_attributes {
Subroutine user_setable_attributes: not called CC=1 SCAR=6.9
Pod documented
110 0 return shift->_user_setable_attributes;
111 }
112  
113 0 ▶sub read_only_attributes {
Subroutine read_only_attributes: not called CC=1 SCAR=6.9
Pod documented
114 0 return shift->_read_only_attributes;
115 }
116  
117 0 ▶sub _user_setable_attributes {
Subroutine _user_setable_attributes: not called CC=1 SCAR=6.9
118 0 confess "Must implement _user_setable_attributes in child class!\n";
119 }
120  
121 0 ▶sub _read_only_attributes {
Subroutine _read_only_attributes: not called CC=1 SCAR=6.9
122 0 confess "Must implement _read_only_attributes in child class!\n";
123 }
124  
125  
126 165 1;
↑ Summary Marketing.pm »