/[Frey]/trunk/lib/Frey/Feed.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

Diff of /trunk/lib/Frey/Feed.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 295 by dpavlin, Wed Nov 5 08:21:06 2008 UTC revision 296 by dpavlin, Wed Nov 5 08:21:06 2008 UTC
# Line 32  has feed => ( Line 32  has feed => (
32  has title => (  has title => (
33          is => 'ro',          is => 'ro',
34          lazy => 1,          lazy => 1,
35          default => sub { $_[0]->feed->title }          default => sub { $_[0]->feed->title },
36  );  );
37    
38    sub entries { [ $_[0]->feed->entries ] }
39    
40  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
41    
42  sub data {  sub data {
43          my ($self) = @_;          my ($self) = @_;
44          my $path = 'var/feed/' . $self->uri->host . '/' . $self->uri->path;          my $path = 'var/feed/' . $self->uri->host . '/' . $self->uri->path;
45          my $data = $self->load( $path );          my $data = $self->load( $path );
46          return $data if $data;          return $data if defined $data;
47    
48          warn "# fetch ",$self->uri;          warn "# fetch ",$self->uri;
49          warn "# data ", dump( $self->feed->entries );          warn "# data ", dump( $self->entries );
50          $self->store( $path, $self->feed->entries );          $self->store( $path, ( $self->entries ) );
51          return $self->feed->entries;;          return $self->entries;
52  }  }
53    
54  1;  1;

Legend:
Removed from v.295  
changed lines
  Added in v.296

  ViewVC Help
Powered by ViewVC 1.1.26