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

Revision 208 (checked in by miyagawa, 15 years ago)
  • Added 'fetch_folders' option in Subscription::Bloglines
  • Added Plagger::Thing base class to share *_tag methods
  • Added 'expression' config in Debug. to be Plagger::Action maybe
  • Fixed ResolveRelativeLink? so it works with entry without link (Bloglines News feed!)
  • Property svn:keywords set to Id Revision
Line 
1 package Plagger::Plugin::Publish::Debug;
2 use strict;
3 use base qw( Plagger::Plugin );
4
5 our $VERSION = '0.10';
6
7 sub register {
8     my($self, $context) = @_;
9     $context->register_hook(
10         $self,
11         'publish.feed' => \&feed,
12     );
13 }
14
15 sub feed {
16     my($self, $context, $args) = @_;
17
18     if ($self->conf->{expression}) {
19         eval $self->conf->{expression};
20         $context->log(error => "Expression error: $@ with '" . $self->conf->{expression} . "'") if $@;
21     } else {
22         $context->dumper($args->{feed});
23     }
24 }
25
26 1;
Note: See TracBrowser for help on using the browser.