Permalink
Browse files

Merge branch 'master' of github.com:davorg/perlanet

  • Loading branch information...
2 parents 9fa41a6 + 8ff192f commit 567ac33097b5ae84362bb96df33f31ea5626079f @davorg committed Oct 10, 2010
Showing with 13 additions and 3 deletions.
  1. +11 −2 lib/Perlanet.pm
  2. +1 −1 lib/Perlanet/Feed.pm
  3. +1 −0 lib/Perlanet/Trait/TemplateToolkit.pm
View
13 lib/Perlanet.pm
@@ -18,7 +18,7 @@ use XML::Feed;
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.51';
+ $VERSION = '0.52';
}
with 'MooseX::Traits';
@@ -174,7 +174,16 @@ sub fetch_feeds {
for my $feed (@feeds) {
my $response = $self->fetch_page($feed->url);
- next if $response->is_error;
+ if ($response->is_error) {
+ carp 'Error retrieving ' . $feed->url;
+ carp $response->http_response->status_line;
+ next;
+ }
+
+ unless (length $response->content) {
+ carp 'No data returned from ' . $feed->url;
+ next;
+ }
try {
my $data = $response->content;
View
2 lib/Perlanet/Feed.pm
@@ -22,7 +22,7 @@ has 'url' => (
is => 'rw',
);
-has 'website' => (
+has 'web' => (
isa => 'Str',
is => 'rw',
);
View
1 lib/Perlanet/Trait/TemplateToolkit.pm
@@ -61,6 +61,7 @@ after 'render' => sub {
$self->page->{template},
{
feed => $feed,
+ cfg => $self,
},
$self->page->{file},
{

0 comments on commit 567ac33

Please sign in to comment.