/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1133 - (hide 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 dpavlin 917 package Frey::Feed::Sponge;
2     use Moose;
3    
4     extends 'Frey::Feed';
5     with 'Frey::Web';
6    
7 dpavlin 932 has uri => (
8     is => 'rw',
9     isa => 'Uri', coerce => 1,
10     required => 1,
11     default => 'http://blog.rot13.org/index.xml',
12     );
13    
14 dpavlin 917 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 dpavlin 932 table => 'feed_items',
27 dpavlin 917 rows => \@rows,
28     NAME => [ qw/date title link description/ ],
29     };
30     }
31    
32 dpavlin 1133 __PACKAGE__->meta->make_immutable;
33     no Moose;
34    
35 dpavlin 917 1;

  ViewVC Help
Powered by ViewVC 1.1.26