Plagger/Plugin/Publish/Speech.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 38 CC 3 SCAR 16.1
CC
3
Cov
0%
init
12.0
register
2.0
feed
2.0
CRAP 5.0
1 package Plagger::Plugin::Publish::Speech;
2 use strict;
3 use base qw( Plagger::Plugin );
4
5 sub init {
6 my $self = shift;
7 $self->SUPER::init(@_);
8
9 if ($^O eq 'MSWin32') {
10 require Plagger::Plugin::Publish::Speech::Win32;
11 bless $self, 'Plagger::Plugin::Publish::Speech::Win32';
12 } elsif ($^O eq 'darwin') {
13 require Plagger::Plugin::Publish::Speech::MacOSX;
14 bless $self, 'Plagger::Plugin::Publish::Speech::MacOSX';
15 } else {
16 Plagger->context->error("Speech plugin doesn't run on your platform $^O");
17 }
18 }
19
20 sub register {
21 my($self, $context) = @_;
22 $context->register_hook(
23 $self,
24 'publish.feed' => $self->can('feed'),
25 'publish.finalize' => $self->can('finalize'),
26 );
27 }
28
29 sub feed { $_[1]->log(warn => 'Subclass should override this') }
30 sub finalize { $_[1]->log(warn => 'Subclass should override this') }
31
32 1;