Sometimes, if you use a non-feed URL, the parser crashes without throwing
an exception. I attach an example
Subject: | test_xml_feedpp.pl |
use strict;
use XML::FeedPP;
my $source = 'http://yahoo.es';
eval {
my $feed = XML::FeedPP->new( $source, -type=>'url' );
print "Title: ", $feed->title(), "\n";
print "Date: ", $feed->pubDate(), "\n";
foreach my $item ( $feed->get_item() ) {
print "URL: ", $item->link(), "\n";
print "Title: ", $item->title(), "\n";
}
};
if($@) {
print "ERROR: $@\n"
}