Technorati/Blog.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 49 CC 2 SCAR 10.3
CC
2
Cov
0%
_accessible
6.0
BEGIN
2.0
new_from_node
2.0
CRAP 2.8
1 package WebService::Technorati::Blog;
2 use strict;
3 use utf8;
4  
5 use fields qw(url name rssurl atomurl inboundblogs inboundlinks lastupdate lat lon rank);
6  
7 use WebService::Technorati::BaseTechnoratiObject;
8 use base 'WebService::Technorati::BaseTechnoratiObject';
9  
10  
11 BEGIN {
12 use vars qw ($VERSION $DEBUG);
13 $VERSION = 0.04;
14 $DEBUG = 0;
15 }
16  
17 =head2 getUrl
18  
19 Usage : getUrl();
20 Purpose :
21 Returns : a scalar string
22 Argument : none
23 Throws : none
24 Comments :
25 See Also : WebService::Technorati
26  
27 =cut
28  
29  
30 =head2 setUrl
31  
32 Usage : setUrl(string);
33 Purpose :
34 Returns : void
35 Argument : a scalar string
36 Throws : none
37 Comments :
38 See Also : WebService::Technorati
39  
40 =cut
41  
42 =head2 getName
43  
44 Usage : getName();
45 Purpose :
46 Returns : a scalar string
47 Argument : none
48 Throws : none
49 Comments :
50 See Also : WebService::Technorati
51  
52 =cut
53  
54  
55 =head2 setName
56  
57 Usage : setName(string);
58 Purpose :
59 Returns : void
60 Argument : a scalar string
61 Throws : none
62 Comments :
63 See Also : WebService::Technorati
64  
65 =cut
66  
67 =head2 getRssurl
68  
69 Usage : getRssurl();
70 Purpose :
71 Returns : a scalar string
72 Argument : none
73 Throws : none
74 Comments :
75 See Also : WebService::Technorati
76  
77 =cut
78  
79  
80 =head2 setRssurl
81  
82 Usage : setRssurl(string);
83 Purpose :
84 Returns : void
85 Argument : a scalar string
86 Throws : none
87 Comments :
88 See Also : WebService::Technorati
89  
90 =cut
91  
92 =head2 getAtomurl
93  
94 Usage : getAtomurl();
95 Purpose :
96 Returns : a scalar string
97 Argument : none
98 Throws : none
99 Comments :
100 See Also : WebService::Technorati
101  
102 =cut
103  
104  
105 =head2 setAtomurl
106  
107 Usage : setAtomurl(string);
108 Purpose :
109 Returns : void
110 Argument : a scalar string
111 Throws : none
112 Comments :
113 See Also : WebService::Technorati
114  
115 =cut
116  
117 =head2 getInboundblogs
118  
119 Usage : getInboundblogs();
120 Purpose :
121 Returns : a scalar string
122 Argument : none
123 Throws : none
124 Comments :
125 See Also : WebService::Technorati
126  
127 =cut
128  
129  
130 =head2 setInboundblogs
131  
132 Usage : setInboundblogs(string);
133 Purpose :
134 Returns : void
135 Argument : a scalar string
136 Throws : none
137 Comments :
138 See Also : WebService::Technorati
139  
140 =cut
141  
142 =head2 getInboundlinks
143  
144 Usage : getInboundlinks();
145 Purpose :
146 Returns : a scalar string
147 Argument : none
148 Throws : none
149 Comments :
150 See Also : WebService::Technorati
151  
152 =cut
153  
154  
155 =head2 setInboundlinks
156  
157 Usage : setInboundlinks(string);
158 Purpose :
159 Returns : void
160 Argument : a scalar string
161 Throws : none
162 Comments :
163 See Also : WebService::Technorati
164  
165 =cut
166  
167 =head2 getLastupdate
168  
169 Usage : getLastupdate();
170 Purpose :
171 Returns : a scalar string
172 Argument : none
173 Throws : none
174 Comments :
175 See Also : WebService::Technorati
176  
177 =cut
178  
179  
180 =head2 setLastupdate
181  
182 Usage : setLastupdate(string);
183 Purpose :
184 Returns : void
185 Argument : a scalar string
186 Throws : none
187 Comments :
188 See Also : WebService::Technorati
189  
190 =cut
191  
192  
193 =head2 getLat
194  
195 Usage : getLat();
196 Purpose :
197 Returns : a scalar string
198 Argument : none
199 Throws : none
200 Comments :
201 See Also : WebService::Technorati
202  
203 =cut
204  
205  
206 =head2 setLat
207  
208 Usage : setLat(string);
209 Purpose :
210 Returns : void
211 Argument : a scalar string
212 Throws : none
213 Comments :
214 See Also : WebService::Technorati
215  
216 =cut
217  
218  
219 =head2 getLon
220  
221 Usage : getLon();
222 Purpose :
223 Returns : a scalar string
224 Argument : none
225 Throws : none
226 Comments :
227 See Also : WebService::Technorati
228  
229 =cut
230  
231  
232 =head2 setLon
233  
234 Usage : setLon(string);
235 Purpose :
236 Returns : void
237 Argument : a scalar string
238 Throws : none
239 Comments :
240 See Also : WebService::Technorati
241  
242 =cut
243  
244  
245 =head2 getRank
246  
247 Usage : getRank();
248 Purpose :
249 Returns : a scalar string
250 Argument : none
251 Throws : none
252 Comments :
253 See Also : WebService::Technorati
254  
255 =cut
256  
257  
258 =head2 setRank
259  
260 Usage : setRank(string);
261 Purpose :
262 Returns : void
263 Argument : a scalar string
264 Throws : none
265 Comments :
266 See Also : WebService::Technorati
267  
268 =cut
269  
270  
271  
272  
273 {
274 my %_attrs = (
275 url => undef,
276 name => undef,
277 rssurl => undef,
278 atomurl => undef,
279 inboundblogs => undef,
280 inboundlinks => undef,
281 lastupdate => undef,
282 lat => undef,
283 lon => undef,
284 rank => undef
285 );
286 sub _accessible {
287 if ($DEBUG) {
288 print __PACKAGE__ . ": checking for attr [$_[1]]\n";
289 }
290 return exists($_attrs{$_[1]});
291 }
292 }
293  
294 sub new_from_node {
295 my $class = shift;
296 my $node = shift;
297 my $data = {
298 url => $node->findvalue('url')->string_value(),
299 name => $node->findvalue('name')->string_value(),
300 rssurl => $node->findvalue('rssurl')->string_value(),
301 atomurl => $node->findvalue('atomurl')->string_value(),
302 inboundblogs => $node->findvalue('inboundblogs')->string_value(),
303 inboundlinks => $node->findvalue('inboundlinks')->string_value(),
304 lastupdate => $node->findvalue('lastupdate')->string_value(),
305 lat => $node->findvalue('lat')->string_value(),
306 lon => $node->findvalue('lon')->string_value(),
307 rank => $node->findvalue('rank')->string_value()
308 };
309 my $self = bless ($data, ref ($class) || $class);
310 return $self;
311 }
312  
313 1;
314