File Coverage

blib/lib/WebService/TypePad/Object/Relationship.pm
Criterion Covered Total %
statement 12 32 37.5
branch 0 8 0.0
condition n/a
subroutine 4 8 50.0
pod 4 4 100.0
total 20 52 38.4


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::Relationship;
2 1     1   5188 use strict;
  1         3  
  1         52  
3 1     1   6 use warnings;
  1         3  
  1         32  
4 1     1   6 use WebService::TypePad::Util::Coerce;
  1         11  
  1         26  
5 1     1   6 use base qw(WebService::TypePad::Object);
  1         2  
  1         519  
6              
7             sub source {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{source} = WebService::TypePad::Util::Coerce::coerce_Entity_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return WebService::TypePad::Util::Coerce::coerce_Entity_out($self->{data}{source});
15             }
16             }
17              
18             sub target {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{target} = WebService::TypePad::Util::Coerce::coerce_Entity_in($_[0]);
22 0           return $_[0];
23             }
24             else {
25 0           return WebService::TypePad::Util::Coerce::coerce_Entity_out($self->{data}{target});
26             }
27             }
28              
29             sub status {
30 0     0 1   my $self = shift;
31 0 0         if (@_) {
32 0           $self->{data}{status} = WebService::TypePad::Util::Coerce::coerce_RelationshipStatus_in($_[0]);
33 0           return $_[0];
34             }
35             else {
36 0           return WebService::TypePad::Util::Coerce::coerce_RelationshipStatus_out($self->{data}{status});
37             }
38             }
39              
40             sub links {
41 0     0 1   my $self = shift;
42 0 0         if (@_) {
43 0           $self->{data}{links} = WebService::TypePad::Util::Coerce::coerce_list_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_LegacyHyperlink_in);
44 0           return $_[0];
45             }
46             else {
47 0           return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{links}, \&WebService::TypePad::Util::Coerce::coerce_LegacyHyperlink_out);
48             }
49             }
50              
51             1;
52              
53             =head1 NAME
54              
55             WebService::TypePad::Object::Relationship - Perl representation of TypePad's Relationship object type
56              
57             =head1 SYNOPSIS
58              
59             use WebService::TypePad::Object::Relationship;
60             my $relationship = WebService::TypePad::Object::Relationship->new();
61              
62             =head1 DESCRIPTION
63              
64             This is a Perl representation of TypePad's Relationship object type.
65             For more information about this type and its parameters, see L.
66              
67             =head1 PROPERTIES
68              
69             Each of these properties has an accessor method which will retrieve the property's value when called with no arguments or set the property's value when called with one argument.
70              
71             =head2 $relationship->links
72              
73             The hyperlinks for the relationship object.
74              
75             Returns an array of L objects.
76              
77             =head2 $relationship->source
78              
79             The source entity, the 'subject' of the relationship.
80              
81             Returns a single L object.
82              
83             =head2 $relationship->status
84              
85             A RelationshipStatus object describing the types of relationship that currently exist between the source and the target.
86              
87             Returns a single L object.
88              
89             =head2 $relationship->target
90              
91             The target entity, the 'object' of the relationship.
92              
93             Returns a single L object.
94              
95             =head1 SEE ALSO
96              
97             =over 1
98              
99             =item * L
100              
101             =back