ConstantContact/CampaignEvent.pm

filter: Statementstmt 65.6% 21 / 32 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 56.5% 26 / 46 CC 4 SCAR 22.5
CC
4
Cov
57%
new
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
« ConstantContact/List.pm ↑ Summary ConstantContact/Resource.pm »
1 package Email::ConstantContact::CampaignEvent;
2
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5
6 2 ▶use Email::ConstantContact::Contact;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Email::ConstantContact::Campaign;
Subroutine BEGIN: called CC=1 SCAR=0.0
8
9 =head1 NAME
10
11 Email::ConstantContact::CampaignEvent - Internal class to interact with ConstantContact CampaignEvent Objects.
12
13 =head1 VERSION
14
15 Version 0.05
16
17 =cut
18
19 2 ▶use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
Subroutine BEGIN: called CC=1 SCAR=0.0
20
21 2 require Exporter;
22
23 2 @ISA = qw(Exporter);
24 2 @EXPORT = qw( );
25
26 2 $VERSION = '0.05';
27
28
29 =head1 SYNOPSIS
30 This module is not typically used directly, but internally by the main
31 Email::ConstantContact object for processing requests.
32
33 =cut
34
35 2 my @fields = qw (
36 id EventTime Code Description BounceMessage
37 );
38
39 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
40 0 my $class = shift;
41 0 my $ccobj = shift;
42 0 my $data = shift;
43 0 my $self = {'_cc' => $ccobj};
44
45 0 ▶ if (defined($data->{'content'}) && defined($data->{'content'}->{'BounceEvent'})) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $data->{"content"} and defined $data->{"content"}{"BounceEvent"}) 0 0 0
Condition0%0/3
defined $data->{"content"} and defined $data->{"content"}{"BounceEvent"}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $data->{"content"} and defined $data->{"content"}{"BounceEvent"}
defined $data->{"content"} defined $data->{"content"}{"BounceEvent"}
Truth table0%0/3
A and B
A= defined $data->{"content"}B= defined $data->{"content"}{"BounceEvent"}
ABresult
0X0
100
111
46 0 foreach my $field (@fields) {
47 0 $self->{$field} = $data->{'content'}->{'BounceEvent'}->{$field};
48 }
49
50 0 $self->{Contact} = new Email::ConstantContact::Contact($ccobj, { content => { 'Contact' => $data->{'content'}->{'BounceEvent'}->{'Contact'}}});
51 0 $self->{Campaign} = new Email::ConstantContact::Campaign($ccobj, { content => { 'Campaign' => $data->{'content'}->{'BounceEvent'}->{'Campaign'}}});
52 }
53
54
55 0 bless ($self, $class);
56 0 return $self;
57 }
58
59 =head1 AUTHOR
60
61 Adam Rich, C<< <arich at cpan.org> >>
62
63 =head1 BUGS
64
65 Please report any bugs or feature requests to C<bug-email-constantcontact at rt.cpan.org>, or through
66 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Email-ConstantContact>. I will be notified, and then you'll
67 automatically be notified of progress on your bug as I make changes.
68
69
70
71
72 =head1 SUPPORT
73
74 You can find documentation for this module with the perldoc command.
75
76 perldoc Email::ConstantContact::CampaignEvent
77
78
79 You can also look for information at:
80
81 =over 4
82
83 =item * RT: CPAN's request tracker
84
85 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Email-ConstantContact>
86
87 =item * AnnoCPAN: Annotated CPAN documentation
88
89 L<http://annocpan.org/dist/Email-ConstantContact>
90
91 =item * CPAN Ratings
92
93 L<http://cpanratings.perl.org/d/Email-ConstantContact>
94
95 =item * Search CPAN
96
97 L<http://search.cpan.org/dist/Email-ConstantContact/>
98
99 =back
100
101
102 =head1 ACKNOWLEDGEMENTS
103
104
105 =head1 COPYRIGHT & LICENSE
106
107 Copyright 2009-2011 Adam Rich, all rights reserved.
108
109 This program is free software; you can redistribute it and/or modify it
110 under the same terms as Perl itself.
111
112
113 =cut
114
115 2 1; # End of Email::ConstantContact::CampaignEvent
« ConstantContact/List.pm ↑ Summary ConstantContact/Resource.pm »