
WWW::EmpireTheatres - Get film listings for the Empire Theatres cinema chain

use WWW::EmpireTheatres;
my $empire = WWW::EmpireTheatres->new;
# what films are currently playing in all locations
for my $film ( @{ $empire->films } ) {
printf( "%s\n", $film->title );
}
# what locations are there?
for my $cinema ( @{ $empire->cinemas } ) {
printf( "%s (%s, %s)\n", $cinema->name, $cinema->city, $cinema->province );
}
my $film = $empire->film( title => 'SpongeBob' );
my $cinema = $empire->cinema( city => 'Fredericton' );
# get today's showtimes for SpongeBob @ Fredericton
for my $showtime ( @{ $cinema->showtimes( film => $film ) } ) {
printf( "%s\n", $showtime->datetime );
}
# where is the film playing?
for my $cinema ( @{ $film->cinemas } ) {
printf( "%s (%s, %s)\n", $cinema->name, $cinema->city, $cinema->province );
}
# what films are playing?
for my $film ( @{ $cinema->films } ) {
printf( "%s\n", $film->title );
}

This module does some basic screen scraping of the http://www.empiretheatres.com/ website to provide a listing of films, cinemas and showtimes.

Creates a new object and gets the film and cinema listing.
This method scrapes the film and cinema listing on the website. It is automatically called when new() is called.
This allows you to search for a film. You can pass a portion of the title and/or it's internal id.
# Christmas With The Kranks
$empire->film( title => 'Kranks' );
This allows you to search for a cinema. You can pass the name, city, provice and/or the internal id. It returns the first successful match.
# Empire 10 Cinemas Regent Mall, Fredericton, New Brunswick
$empire->cinema( city => 'Fredericton' );
Returns the showtimes for $film @ $cinema on $date (or today if no date is specified)
Returns the list of films
Returns the list cinemas
Returns the internal WWW::Mechanize object


Copyright 2007 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.