/[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 932 - (hide annotations)
Tue Jan 6 00:21:29 2009 UTC (15 years, 4 months ago) by dpavlin
File size: 533 byte(s)
spunge tweaks
1 dpavlin 917 package Frey::Feed::Sponge;
2     use Moose;
3    
4     extends 'Frey::Feed';
5     with 'Frey::Web';
6     #with 'Frey::Storage';
7    
8 dpavlin 932 has uri => (
9     is => 'rw',
10     isa => 'Uri', coerce => 1,
11     required => 1,
12     default => 'http://blog.rot13.org/index.xml',
13     );
14    
15 dpavlin 917 sub as_sponge {
16     my ($self) = @_;
17    
18     my @rows;
19    
20     foreach my $entry ( $self->entries ) {
21     my @row;
22     push @row, $entry->$_ foreach ( qw/pubDate title link description/ );
23     push @rows, [ @row ];
24     }
25    
26     return {
27 dpavlin 932 table => 'feed_items',
28 dpavlin 917 rows => \@rows,
29     NAME => [ qw/date title link description/ ],
30     };
31     }
32    
33     1;

  ViewVC Help
Powered by ViewVC 1.1.26