blib/lib/Net/Blogger/Engine/Blogger.pm

filter: Statementstmt 67.7% 21 / 31 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 55.5% 5 / 9 Podpod 100% 3 / 3 totaltotal 60.4% 29 / 48 SCAR 12.7
CC
3
Cov
60%
new
6.0
Proxy
6.0
MaxPostLength
2.0
CRAP 3.6
« Build ↑ Summary blib/lib/Net/Blogger/Engine/Radio.pm »
1 {
2
3 1 =head1 NAME
4
5 Net::Blogger::Engine::Blogger - Pyra Blogger API engine
6
7 =head1 SYNOPSIS
8
9 TBW
10
11 =head1 DESCRIPTION
12
13 This package inherits I<Net::Blogger::Engine::Base> and defines methods specific
14 the the Pyra (blogger.com) XML-RPC server.
15
16 =cut
17
18 package Net::Blogger::Engine::Blogger;
19 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20
21 1 ▶use constant BLOGGER_PROXY => "http://plant.blogger.com/api/RPC2";
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use constant MAX_POSTLENGTH => 65536;
Subroutine BEGIN: called CC=1 SCAR=0.0
23
24 1 $Net::Blogger::Engine::Blogger::VERSION = '1.0';
25 1 @Net::Blogger::Engine::Blogger::ISA = qw ( Exporter Net::Blogger::Engine::Base );
26 1 @Net::Blogger::Engine::Blogger::EXPORT = qw ();
27 1 @Net::Blogger::Engine::Blogger::EXPORT_OK = qw ();
28
29 1 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 1 ▶use Net::Blogger::Engine::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
31
32 sub new {
33 0 ▶ my $pkg = shift;
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
34
35 0 my $self = {};
36 0 bless $self,$pkg;
37
38 0 ▶ if (! $self->SUPER::init(@_)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->SUPER::init(@_)) 0 0 0
39 0 return 0;
40 }
41
42 0 return $self;
43 }
44
45 =head1 PACKAGE METHODS
46
47 =head2 __PACKAGE__->new()
48
49 Instantiate a new Blogger Engine object.
50
51 =head1 OBJECT METHODS
52
53 =pod
54
55 =head2 $pkg->Proxy()
56
57 Return the URI of the Blogger XML-RPC proxy
58
59 =cut
60
61 sub Proxy {
62 0 ▶ my $self = shift;
Subroutine Proxy: not called CC=2 SCAR=17.9
Pod documented
63 0 ▶ return $self->SUPER::Proxy(@_) || BLOGGER_PROXY;
Condition0%0/2
$self->SUPER::Proxy(@_) || 'http://plant.blogger.com/api/RPC2'
l!l
00
MC/DC0%0/1
$self->SUPER::Proxy(@_) || 'http://plant.blogger.com/api/RPC2'
$self->SUPER::Proxy(@_)
Truth table0%0/2
A
A= $self->SUPER::Proxy(@_)
Aresult
11
00
64 }
65
66 =head2 $pkg->MaxPostLength()
67
68 Return the maximum number of characters a single post may contain.
69
70 =cut
71
72 sub MaxPostLength {
73 0 ▶ return MAX_POSTLENGTH;
Subroutine MaxPostLength: not called CC=1 SCAR=6.9
Pod documented
74 }
75
76 sub DESTROY {
77 0 ▶ return 1;
Subroutine DESTROY: not called CC=1 SCAR=6.9
78 }
79
80 =head1 KNOWN ISSUES
81
82 =over 4
83
84 =item *
85
86 B<Delays>
87
88 It remains uncertain how long a program needs to wait between the time that a new
89 post is submitted to the Blogger servers and that that may post may be acted upon.
90
91 The applies to the Blogger API I<getPost>, I<editPost> and I<deletePost> methods equally.
92 Anything under a 10 second will often result in a "post not found" fault. A delay of 10
93 seconds or more is usually successful. Your mileage may vary.
94
95 =item *
96
97 B<setTemplate()>
98
99 <quote src = "ev">
100 There are some blogs for which setTemplate will return a permission denied error. Newly
101 created blogs will work. Sufficiently older blogs will work. A meanwhile work-around:
102 edit the template through Blogger UI first.
103 </quote>
104
105 =back
106
107 =cut
108
109 =head1 VERSION
110
111 1.0
112
113 =head1 DATE
114
115 $Date: 2005/03/26 19:29:08 $
116
117 =head1 AUTHOR
118
119 Aaron Straup Cope
120
121 =head1 SEE ALSO
122
123 L<Net::Blogger::Engine::Base>
124
125 http://plant.blogger.com/api/
126
127 =head1 LICENSE
128
129 Copyright (c) 2001-2005 Aaron Straup Cope.
130
131 This is free software, you may use it and distribute it under the
132 same terms as Perl itself.
133
134 =cut
135
136 1 return 1;
137
138 }
« Build ↑ Summary blib/lib/Net/Blogger/Engine/Radio.pm »