File Coverage

blib/lib/WebService/TypePad/Object/LegacyHyperlink.pm
Criterion Covered Total %
statement 12 52 23.0
branch 0 16 0.0
condition n/a
subroutine 4 12 33.3
pod 8 8 100.0
total 24 88 27.2


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::LegacyHyperlink;
2 1     1   2470 use strict;
  1         2  
  1         61  
3 1     1   7 use warnings;
  1         3  
  1         47  
4 1     1   7 use WebService::TypePad::Util::Coerce;
  1         2  
  1         44  
5 1     1   6 use base qw(WebService::TypePad::Object::Base);
  1         2  
  1         869  
6              
7             sub rel {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{rel} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return $self->{data}{rel};
15             }
16             }
17              
18             sub type {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{type} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
22 0           return $_[0];
23             }
24             else {
25 0           return $self->{data}{type};
26             }
27             }
28              
29             sub href {
30 0     0 1   my $self = shift;
31 0 0         if (@_) {
32 0           $self->{data}{href} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
33 0           return $_[0];
34             }
35             else {
36 0           return $self->{data}{href};
37             }
38             }
39              
40             sub html {
41 0     0 1   my $self = shift;
42 0 0         if (@_) {
43 0           $self->{data}{html} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
44 0           return $_[0];
45             }
46             else {
47 0           return $self->{data}{html};
48             }
49             }
50              
51             sub width {
52 0     0 1   my $self = shift;
53 0 0         if (@_) {
54 0           $self->{data}{width} = WebService::TypePad::Util::Coerce::coerce_integer_in($_[0]);
55 0           return $_[0];
56             }
57             else {
58 0           return $self->{data}{width};
59             }
60             }
61              
62             sub height {
63 0     0 1   my $self = shift;
64 0 0         if (@_) {
65 0           $self->{data}{height} = WebService::TypePad::Util::Coerce::coerce_integer_in($_[0]);
66 0           return $_[0];
67             }
68             else {
69 0           return $self->{data}{height};
70             }
71             }
72              
73             sub total {
74 0     0 1   my $self = shift;
75 0 0         if (@_) {
76 0           $self->{data}{total} = WebService::TypePad::Util::Coerce::coerce_integer_in($_[0]);
77 0           return $_[0];
78             }
79             else {
80 0           return $self->{data}{total};
81             }
82             }
83              
84             sub allowed_methods {
85 0     0 1   my $self = shift;
86 0 0         if (@_) {
87 0           $self->{data}{allowedMethods} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in);
88 0           return $_[0];
89             }
90             else {
91 0           return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{allowedMethods});
92             }
93             }
94              
95             1;
96              
97             =head1 NAME
98              
99             WebService::TypePad::Object::LegacyHyperlink - Perl representation of TypePad's LegacyHyperlink object type
100              
101             =head1 SYNOPSIS
102              
103             use WebService::TypePad::Object::LegacyHyperlink;
104             my $legacy_hyperlink = WebService::TypePad::Object::LegacyHyperlink->new();
105              
106             =head1 DESCRIPTION
107              
108             This is a Perl representation of TypePad's LegacyHyperlink object type.
109             For more information about this type and its parameters, see L.
110              
111             =head1 PROPERTIES
112              
113             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.
114              
115             =head2 $legacy_hyperlink->allowed_methods
116              
117             B If present, gives a list of methods that the currently-authenticated user is allowed to perform on this resource. The empty array indicates that no methods are allowed. If the allowedMethods property is absent, this indicates that the server is unable to determine the allowed methods and so the client should issue an OPTIONS or GET request on the resource to determine what methods are allowed.
118              
119             Returns an array of C values.
120              
121             =head2 $legacy_hyperlink->height
122              
123             B Where the link is to a visual media item (a photo, for example), the height of the item in pixels.
124              
125             Returns a single C value.
126              
127             =head2 $legacy_hyperlink->href
128              
129             B The absolute URL of the target resource.
130              
131             Returns a single C value.
132              
133             =head2 $legacy_hyperlink->html
134              
135             B The HTML embed code for this media link.
136              
137             Returns a single C value.
138              
139             =head2 $legacy_hyperlink->rel
140              
141             B A keyword representing the relationship type of the hyperlink.
142              
143             Returns a single C value.
144              
145             =head2 $legacy_hyperlink->total
146              
147             B Where the link is to a list resource, the total number of items in that list. This is provided in some cases to avoid the need to retrieve the resource and inspect its "totalResults" property directly.
148              
149             Returns a single C value.
150              
151             =head2 $legacy_hyperlink->type
152              
153             B The MIME media type of the target resource.
154              
155             Returns a single C value.
156              
157             =head2 $legacy_hyperlink->width
158              
159             B Where the link is to a visual media item (a photo, for example), the width of the item in pixels.
160              
161             Returns a single C value.
162              
163             =head1 SEE ALSO
164              
165             =over 1
166              
167             =item * L
168              
169             =back