Radio::ProgrammesSchedules::BBC - Interface to BBC Radio Programmes Schedules.
Version 0.03
Each week, nearly 35 million people listen to BBC Radio.The BBC offers a portfolio of services aimed at offering listeners the highest quality programmes, whatever their interest or mood.It includes the following:
Music radio on Radio 1, Radio 1Xtra, Radio 2, 6 Music and Asian Network.
Classical music and jazz on Radio 3.
Speech, drama, analysis and the arts on Radio 4.
Comedy, drama and children's programming on Radio 4 Extra.
News and sport on 5 live and 5 live sports extra.
and many more.
The module provides programmes schedules for Radio 1, 1Xtra, Radio 2, Radio 3, Radio 4, Radio 4 Extra, 5 Live, 5 Live Sports Extra, 6 Music, Asian Network and World Service.The constructor expects a reference to an anonymous hash as input parameter. Table below shows the possible value of various key ( channel, location, frequency, yyyy, mm, dd ). The yyyy, mm and dd are optional. If missing picks up the current year, month and day.
+---------------------+------------------+-----------------+-----------+------+----+----+ | Name | Channel | Location | Frequency | YYYY | MM | DD | +---------------------+------------------+-----------------+-----------+------+----+----+ | Radio 1 | radio1 | england | N/A | 2011 | 11 | 15 | | | | northernireland | | | | | | | | scotland | | | | | | | | wales | | | | | | | | | | | | | | Radio 1Xtra | 1xtra | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | Radio 2 | radio2 | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | Radio 3 | radio3 | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | Radio 4 | radio4 | N/A | fm | 2011 | 11 | 15 | | | | | lw | | | | | | | | | | | | | Radio 4 Extra | radio4extra | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | 5 Live | 5live | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | 5 Live Sports Extra | 5livesportsextra | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | 6 Music | 6music | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | Asian Network | asiannetwork | N/A | N/A | 2011 | 11 | 15 | | | | | | | | | | World Service | worldservice | N/A | N/A | 2011 | 11 | 15 | +---------------------+------------------+-----------------+-----------+------+----+----+ use strict; use warnings; use Radio::ProgrammesSchedules::BBC; my ($bbc); # BBC Radio 1 $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio1', location => 'england' }); # BBC Radio 1Xtra $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => '1xtra' }); # BBC Radio 2 $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio2' }); # BBC Radio 3 $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio3' }); # BBC Radio 4 $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio4', frequency => 'fm' }); # BBC Radio 4 Extra $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio4extra' }); # BBC 5 Live $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => '5live' }); # BBC 5 Live Sports Extra $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => '5livesportsextra' }); # BBC 6 Music $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => '6music' }); # BBC Asian Network $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'aisannetwork' }); # BBC World Service $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'worldservice' });
Return the schedules listings as reference to an array of anonymous hash containing start time , end time, short description and url to get more detail of each program.
use strict; use warnings; use Radio::ProgrammesSchedules::BBC; my $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio1', location => 'england' }); my $listings = $bbc->get_listings();
Returns listings in XML format.
use strict; use warnings; use Radio::ProgrammesSchedules::BBC; my $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio1', location => 'england' }); print $bbc->as_xml();
Returns listings in a human readable format.
use strict; use warnings; use Date::Holidays::PAK; my $bbc = Radio::ProgrammesSchedules::BBC->new({ channel => 'radio1', location => 'england' }); print $bbc->as_string(); # or even simply print $bbc;
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
<mohammad.anwar at yahoo.com>
Please report any bug/feature requests to bug-radio-programmesschedules-bbc at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Radio-ProgrammesSchedules-BBC. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-radio-programmesschedules-bbc at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Radio::ProgrammesSchedules::BBC
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Radio-ProgrammesSchedules-BBC
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Radio-ProgrammesSchedules-BBC
CPAN Ratings
http://cpanratings.perl.org/d/Radio-ProgrammesSchedules-BBC
Search CPAN
http://search.cpan.org/dist/Radio-ProgrammesSchedules-BBC/
Radio::ProgrammesSchedules::BBC provides information from BBC official website. This should be used as it is without any modifications. BBC remains the sole owner of the data. The terms and condition for Personal and Non-business use can be found here:
http://www.bbc.co.uk/terms/personal.shtml.
Copyright 2011 Mohammad S Anwar.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Radio::ProgrammesSchedules::BBC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Radio::ProgrammesSchedules::BBC
CPAN shell
perl -MCPAN -e shell install Radio::ProgrammesSchedules::BBC
For more information on module installation, please visit the detailed CPAN module installation guide.