root/trunk/plagger/lib/Plagger/Plugin/Publish/Speech.pm

Revision 419 (checked in by miyagawa, 15 years ago)

darwin, not Darwin

Line 
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;
Note: See TracBrowser for help on using the browser.