/[Frey]/trunk/lib/Frey/Feed/Sponge.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Frey/Feed/Sponge.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1133 - (show annotations)
Tue Jun 30 15:10:55 2009 UTC (14 years, 10 months ago) by dpavlin
File size: 556 byte(s)
make classes immutable and remove moose droppings to make Perl::Critic::Moose happy
1 package Frey::Feed::Sponge;
2 use Moose;
3
4 extends 'Frey::Feed';
5 with 'Frey::Web';
6
7 has uri => (
8 is => 'rw',
9 isa => 'Uri', coerce => 1,
10 required => 1,
11 default => 'http://blog.rot13.org/index.xml',
12 );
13
14 sub as_sponge {
15 my ($self) = @_;
16
17 my @rows;
18
19 foreach my $entry ( $self->entries ) {
20 my @row;
21 push @row, $entry->$_ foreach ( qw/pubDate title link description/ );
22 push @rows, [ @row ];
23 }
24
25 return {
26 table => 'feed_items',
27 rows => \@rows,
28 NAME => [ qw/date title link description/ ],
29 };
30 }
31
32 __PACKAGE__->meta->make_immutable;
33 no Moose;
34
35 1;

  ViewVC Help
Powered by ViewVC 1.1.26