root/trunk/plagger/lib/Plagger/Plugin/Bundle/Defaults.pm

Revision 1769 (checked in by miyagawa, 14 years ago)
  • Moved Photocast/MediaRSS/Hatena specific parsing methods to Namespace::* plugins. w00t!
  • Added Bundle::Defaults plugin that loads bunch of "default" plugins
Line 
1 package Plagger::Plugin::Bundle::Defaults;
2 use strict;
3 use base qw( Plagger::Plugin );
4
5 sub register {
6     my($self, $context) = @_;
7
8     unless ( $context->is_loaded(qr/^Aggregator::/) ) {
9         $context->load_plugin({ module => 'Aggregator::Simple' });
10     }
11
12     $context->autoload_plugin({ module => 'Summary::Auto' });
13     $context->autoload_plugin({ module => 'Summary::Simple' });
14
15     $context->autoload_plugin({ module => 'Namespace::HatenaFotolife' });
16     $context->autoload_plugin({ module => 'Namespace::MediaRSS' });
17     $context->autoload_plugin({ module => 'Namespace::ApplePhotocast' });
18 }
19
20 1;
21 __END__
22
23 =head1 NAME
24
25 Plagger::Plugin::Bundle::Defaults - Load default built-in plugins
26
27 =head1 SYNOPSIS
28
29   # It's not actually needed since Plagger autoload this bundle as well
30   - module: Bundle::Defaults
31
32 =head1 DESCRIPTION
33
34 This plugin is a bundle of default plugins, loaded by default. The
35 default plugins loaded by this plugin are:
36
37 =over 4
38
39 =item Aggregator::Simple
40
41 =item Summary::Auto
42
43 =item Summary::Simple
44
45 =item Namespace::MediaRSS
46
47 =item Namespace::HatenaFotolife
48
49 =item Namespace::ApplePhotocast
50
51 =back
52
53 =head1 AUTHOR
54
55 Tatsuhiko Miyagawa
56
57 =head1 SEE ALSO
58
59 L<Plagger>
60
61 =cut
Note: See TracBrowser for help on using the browser.