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

filter: Statementstmt 60.0% 15 / 25 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 58.3% 21 / 36 SCAR 8.5
CC
2
Cov
56%
new
6.0
GetBlogId
2.0
BlogId
2.0
CRAP 2.4
« blib/lib/Net/Blogger/Engine/Blogger.pm ↑ Summary blib/lib/Net/Blogger/Engine/Manila.pm »
1 {
2
3 1 =head1 NAME
4
5 Net::Blogger::Engine::Radio - UserLand Radio Blogger API engine
6
7 =head1 SYNOPSIS
8
9 my $radio = Blogger->new(engine=>"radio");
10 $radio->Proxy(PROXY);
11 $radio->Username(USERNAME);
12 $radio->Password(PASSWORD);
13
14 $radio->newPost(
15 postbody => \"hello world",
16 publish=>1,
17 );
18
19 $radio->metaWeblog()->newPost(
20 title=>"hello",
21 description=>"world",
22 publish=>1,
23 );
24
25 =head1 DESCRIPTION
26
27 This package inherits I<Net::Blogger::Engine::Userland> and implements
28 methods specific to a RadioUserLand XML-RPC server.
29
30 =cut
31
32 package Net::Blogger::Engine::Radio;
33 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
34
35 1 $Net::Blogger::Engine::Radio::VERSION = '1.0';
36 1 @Net::Blogger::Engine::Radio::ISA = qw (
37 Exporter
38 Net::Blogger::Engine::Userland
39 );
40 1 @Net::Blogger::Engine::Radio::EXPORT = qw ();
41 1 @Net::Blogger::Engine::Radio::EXPORT_OK = qw ();
42
43 1 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 1 ▶use Net::Blogger::Engine::Userland;
Subroutine BEGIN: called CC=1 SCAR=0.0
45
46 =head1 PACKAGE METHODS
47
48 =cut
49
50 =head2 __PACKAGE__->new(\%args)
51
52 Releases prior to Net::Blogger 0.85 accepted a list of arguments
53 rather than a reference. Version 0.85+ are backwards compatible.
54
55 Returns an object. Woot!
56
57 =cut
58
59 sub new {
60 0 ▶ my $pkg = shift;
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
61
62 0 my $self = {};
63 0 bless $self,$pkg;
64
65 0 ▶ if (! $self->SUPER::init(@_)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->SUPER::init(@_)) 0 0 0
66 0 return undef;
67 }
68
69 0 return $self;
70 }
71
72 =head1 Blogger API METHODS
73
74 =cut
75
76 =head2 $pkg->GetBlogId()
77
78 "blogid is ignored. (Radio only manages one weblog, but something
79 interesting could be done here with categories. In your code you
80 must pass "home", all other blogid's cause an error.)"
81
82 http://radio.userland.com/emulatingBloggerInRadio#howTheBloggerApiMapsOntoRadioWeblogs
83
84 This method overrides I<Net::Blogger::API::Extended::getBlogId> method
85
86 =cut
87
88 sub GetBlogId {
89 0 ▶ my $self = shift;
Subroutine GetBlogId: not called CC=1 SCAR=6.9
Pod documented
90 0 return "home";
91 }
92
93 =head2 $pkg->BlogId()
94
95 See docs for I<GetBlogId>
96
97 =cut
98
99 sub BlogId {
100 0 ▶ my $self = shift;
Subroutine BlogId: not called CC=1 SCAR=6.9
Pod documented
101 0 return $self->GetBlogId();
102 }
103
104 =head1 VERSION
105
106 1.0
107
108 =head1 DATE
109
110 $Date: 2005/03/26 19:29:08 $
111
112 =head1 AUTHOR
113
114 Aaron Straup Cope
115
116 =head1 SEE ALSO
117
118 L<Net::Blogger::Engine::Userland>
119
120 L<Net::Blogger::Engine::Userland::metaWeblog>
121
122 http://frontier.userland.com/emulatingBloggerInManila
123
124 =head1 LICENSE
125
126 Copyright (c) 2001-2005 Aaron Straup Cope.
127
128 This is free software, you may use it and distribute it under the same terms as Perl itself.
129
130 =cut
131
132 1 return 1;
133
134 }
« blib/lib/Net/Blogger/Engine/Blogger.pm ↑ Summary blib/lib/Net/Blogger/Engine/Manila.pm »