RSS::NewsFeed::BBC is a Perl interface to BBC news feed.
METHODS
get_title()
Returns the news feed title of national/international BBC news. This should *ONLY* be called after method get_national() or get_international(), otherwise it will return Undefined.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
my $title = $news->get_title();
get_url()
Returns the news feed URL of national/international BBC news. This should *ONLY* be called after method get_national() or get_international(), otherwise it will return Undefined.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
my $url = $news->get_url();
get_description()
Returns the news feed description of national/international BBC news. This should *ONLY* be called after method get_national() or get_international(), otherwise it will return Undefined.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
my $description = $news->get_description();
get_national()
Returns the BBC National news.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
get_international()
Returns the BBC International news.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $international = $news->get_international();
as_xml()
Returns latest news in the XML format.This should *ONLY* be called after method get_national() or get_international().
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
print $news->as_xml();
as_string()
Returns latest news in a human readable format.
use strict; use warnigns;
use RSS::NewsFeed::BBC;
my $news = RSS::NewsFeed::BBC->new();
my $national = $news->get_national();
print $news->as_string();
# or even simply
print $news;
Requirements:
· Perl