IMDB-Film-0.53/0000755000175000017500000000000012071605164012631 5ustar michaelmichaelIMDB-Film-0.53/lib/0000755000175000017500000000000012071605164013377 5ustar michaelmichaelIMDB-Film-0.53/lib/IMDB/0000755000175000017500000000000012071605164014112 5ustar michaelmichaelIMDB-Film-0.53/lib/IMDB/Persons.pm0000644000175000017500000002157312071057776016123 0ustar michaelmichael=head1 NAME IMDB::Persons - Perl extension for retrieving movies persons from IMDB.com =head1 SYNOPSIS use IMDB::Persons; # # Retrieve a person information by IMDB code # my $person = new IMDB::Persons(crit => '0000129'); or # # Retrieve a person information by name # my $person = new IMDB::Persons(crit => 'Tom Cruise'); or # # Process already stored HTML page from IMDB # my $person = new IMDB::Persons(file => 'imdb.html'); if($person->status) { print "Name: ".$person->name."\n"; print "Birth Date: ".$person->date_of_birth."\n"; } else { print "Something wrong: ".$person->error."!\n"; } =head1 DESCRIPTION IMDB::Persons allows to retrieve an information about IMDB persons (actors, actresses, directors etc): full name, photo, date and place of birth, mini bio and filmography. =cut package IMDB::Persons; use strict; use warnings; use Carp; use Data::Dumper; use base qw(IMDB::BaseClass); use fields qw( _name _date_of_birth _place_of_birth _photo _mini_bio _filmography_types _filmography _genres _plot_keywords ); use vars qw($VERSION %FIELDS); use constant FORCED => 1; use constant CLASS_NAME => 'IMDB::Persons'; use constant MAIN_TAG => 'h4'; BEGIN { $VERSION = '0.53'; } { my %_defaults = ( cache => 0, debug => 0, error => [], matched => [], cache_exp => '1 h', host => 'www.imdb.com', query => 'name/nm', search => 'find?nm=on&mx=20&q=', status => 0, timeout => 10, user_agent => 'Mozilla/5.0', ); sub _get_default_attrs { keys %_defaults } sub _get_default_value { my($self, $attr) = @_; $_defaults{$attr}; } } =head1 Object Private Methods =over 4 =item _init() Initialize a new object. =cut sub _init { my CLASS_NAME $self = shift; my %args = @_; croak "Person IMDB ID or Name should be defined!" if !$args{crit} && !$args{file}; $self->SUPER::_init(%args); my $name = $self->name(); for my $prop (grep { /^_/ && !/^_name$/ } sort keys %FIELDS) { ($prop) = $prop =~ /^_(.*)/; $self->$prop(); } } =item _search_person() Implements a logic to search IMDB persons by their names. =cut sub _search_person { my CLASS_NAME $self = shift; return $self->SUPER::_search_results('\/name\/nm(\d+)', '/a'); } sub fields { my CLASS_NAME $self = shift; return \%FIELDS; } =back =head1 Object Public Methods =over 4 =item name() Retrieve a person full name my $person_name = $person->name(); =cut sub name { my CLASS_NAME $self = shift; if(!defined $self->{'_name'}) { my $parser = $self->_parser(FORCED); $parser->get_tag('title'); my $title = $parser->get_text(); $title =~ s#\s*\-\s*IMDB##i; $self->_show_message("Title=$title", 'DEBUG'); # Check if we have some search results my $no_matches = 1; while(my $tag = $parser->get_tag('td')) { if($tag->[1]->{class} && $tag->[1]->{class} eq 'media_strip_header') { $no_matches = 0; last; } } if($title =~ /imdb\s+name\s+search/i && !$no_matches) { $self->_show_message("Go to search page ...", 'DEBUG'); $title = $self->_search_person(); } $title = '' if $title =~ /IMDb Name Search/i; if($title) { $self->status(1); $self->retrieve_code($parser, 'http://www.imdb.com/name/nm(\d+)') unless $self->code; } else { $self->status(0); $self->error('Not Found'); } $title =~ s/^imdb\s+\-\s+//i; $self->{'_name'} = $title; } return $self->{'_name'}; } =item mini_bio() Returns a mini bio for specified IMDB person my $mini_bio = $person->mini_bio(); =cut sub mini_bio { my CLASS_NAME $self = shift; if(!defined $self->{_mini_bio}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('div') ) { last if $tag->[1]->{class} && $tag->[1]->{class} eq 'infobar'; } my $tag = $parser->get_tag('p'); $self->{'_mini_bio'} = $parser->get_trimmed_text('a'); } return $self->{'_mini_bio'}; } =item date_of_birth() Returns a date of birth of IMDB person in format 'day' 'month caption' 'year': my $d_birth = $person->date_of_birth(); =cut #TODO: add date convertion in different formats. sub date_of_birth { my CLASS_NAME $self = shift; if(!defined $self->{'_date_of_birth'}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text; last if $text =~ /^Born/i; } my $date = ''; my $year = ''; my $place = ''; while(my $tag = $parser->get_tag()) { last if $tag->[0] eq '/td'; if($tag->[0] eq 'a') { my $text = $parser->get_text(); next unless $text; SWITCH: for($tag->[1]->{href}) { /birth_monthday/i && do { $date = $text; $date =~ s#(\w+)\s(\d+)#$2 $1#; last SWITCH; }; /birth_year/i && do { $year = $text; last SWITCH; }; /birth_place/i && do { $place = $text; last SWITCH; }; } } } $self->{'_date_of_birth'} = {date => "$date $year", place => $place}; } return $self->{'_date_of_birth'}{'date'}; } =item place_of_birth() Returns a name of place of the birth my $place = $person->place_of_birth(); =cut sub place_of_birth { my CLASS_NAME $self = shift; return $self->{'_date_of_birth'}{'place'}; } =item photo() Return a path to the person's photo my $photo = $person->photo(); =cut sub photo { my CLASS_NAME $self = shift; if(!defined $self->{'_photo'}) { my $tag; my $parser = $self->_parser(FORCED); while($tag = $parser->get_tag('img')) { if($tag->[1]->{alt} && $tag->[1]->{alt} eq $self->name . ' Picture') { $self->{'_photo'} = $tag->[1]{src}; last; } } $self->{'_photo'} = 'No Photo' unless $self->{'_photo'}; } return $self->{'_photo'}; } =item filmography() Returns a person's filmography as a hash of arrays with following structure: my $fg = $person->filmography(); __DATA__ $fg = { 'Section' => [ { title => 'movie title', role => 'person role', year => 'year of movie production', code => 'IMDB code of movie', } ]; } The section can be In Development, Actor, Self, Thanks, Archive Footage, Producer etc. =cut sub filmography { my CLASS_NAME $self = shift; my $films; if(!$self->{'_filmography'}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('h2')) { my $text = $parser->get_text; last if $text && $text =~ /filmography/i; } my $key = 'Unknown'; while(my $tag = $parser->get_tag()) { last if $tag->[0] eq 'script'; # Netx section after filmography if($tag->[0] eq 'h5') { my $caption = $parser->get_trimmed_text('h5', '/a'); $key = $caption if $caption; $key =~ s/://; $self->_show_message("FILMOGRAPHY: key=$key; caption=$caption; trimmed=".$parser->get_trimmed_text('h5', '/a'), 'DEBUG'); } if($tag->[0] eq 'a' && $tag->[1]->{href} && $tag->[1]{href} =~ m!title\/tt(\d+)!) { my $title = $parser->get_text(); my $text = $parser->get_trimmed_text('br', '/li'); $self->_show_message("link: $title --> $text", 'DEBUG'); my $code = $1; my($year, $role) = $text =~ m!\((\d+)\)\s.+\.+\s(.+)!; push @{$films->{$key}}, { title => $title, code => $code, year => $year, role => $role, }; } } $self->{'_filmography'} = $films; } else { $self->_show_message("filmography defined!", 'DEBUG'); } return $self->{'_filmography'}; } =item genres() Retrieve a list of movie genres for specified person: my $genres = $persons->genres; =cut sub genres { my CLASS_NAME $self = shift; unless($self->{_genres}) { my @genres = $self->_get_common_array_propery('genres'); $self->{_genres} = \@genres; } $self->{_genres}; } =item plot_keywords() Retrieve a list of keywords for movies where specified person plays: my $keywords = $persons->plot_keywords; =cut sub plot_keywords { my CLASS_NAME $self = shift; unless($self->{_plot_keywords}) { my @keywords = $self->_get_common_array_propery('plot keywords'); $self->{_plot_keywords} = \@keywords; } $self->{_plot_keywords}; } sub _get_common_array_propery { my CLASS_NAME $self = shift; my $target = shift || ''; my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text(); last if $text =~ /$target/i; } my @res = (); while(my $tag = $parser->get_tag('a')) { last if $tag->[1]->{class} && $tag->[1]->{class} =~ /tn15more/i; push @res, $parser->get_text; } return @res; } sub filmography_types { my CLASS_NAME $self = shift; } sub DESTROY { my $self = shift; } 1; __END__ =back =head1 EXPORTS No Matches.=head1 BUGS Please, send me any found bugs by email: stepanov.michael@gmail.com. =head1 SEE ALSO IMDB::Film IMDB::BaseClass WWW::Yahoo::Movies HTML::TokeParser =head1 AUTHOR Mikhail Stepanov AKA nite_man (stepanov.michael@gmail.com) =head1 COPYRIGHT Copyright (c) 2004 - 2007, Mikhail Stepanov. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. =cut IMDB-Film-0.53/lib/IMDB/Film.pm0000644000175000017500000011162612071067050015342 0ustar michaelmichael=head1 NAME IMDB::Film - OO Perl interface to the movies database IMDB. =head1 SYNOPSIS use IMDB::Film; # # Retrieve a movie information by its IMDB code # my $imdbObj = new IMDB::Film(crit => 227445); or # # Retrieve a movie information by its title # my $imdbObj = new IMDB::Film(crit => 'Troy'); or # # Parse already stored HTML page from IMDB # my $imdbObj = new IMDB::Film(crit => 'troy.html'); if($imdbObj->status) { print "Title: ".$imdbObj->title()."\n"; print "Year: ".$imdbObj->year()."\n"; print "Plot Symmary: ".$imdbObj->plot()."\n"; } else { print "Something wrong: ".$imdbObj->error; } =head1 DESCRIPTION =head2 Overview IMDB::Film is an object-oriented interface to the IMDB. You can use that module to retrieve information about film: title, year, plot etc. =cut package IMDB::Film; use strict; use warnings; use base qw(IMDB::BaseClass); use Carp; use Data::Dumper; use fields qw( _title _kind _year _episodes _episodeof _summary _cast _directors _writers _cover _language _country _top_info _rating _genres _tagline _plot _also_known_as _certifications _duration _full_plot _trivia _goofs _awards _official_sites _release_dates _aspect_ratio _mpaa_info _company _connections _full_companies _recommendation_movies _plot_keywords _big_cover_url _big_cover_page _storyline full_plot_url ); use vars qw( $VERSION %FIELDS %FILM_CERT %FILM_KIND $PLOT_URL ); use constant CLASS_NAME => 'IMDB::Film'; use constant FORCED => 1; use constant USE_CACHE => 1; use constant DEBUG_MOD => 1; use constant EMPTY_OBJECT => 0; use constant MAIN_TAG => 'h4'; BEGIN { $VERSION = '0.53'; # Convert age gradation to the digits # TODO: Store this info into constant file %FILM_CERT = ( G => 'All', R => 16, 'NC-17' => 16, PG => 13, 'PG-13' => 13 ); %FILM_KIND = ( '' => 'movie', TV => 'tv movie', V => 'video movie', mini => 'tv mini series', VG => 'video game', S => 'tv series', E => 'episode' ); } { my %_defaults = ( cache => 0, debug => 0, error => [], cache_exp => '1 h', cache_root => '/tmp', matched => [], host => 'www.imdb.com', query => 'title/tt', search => 'find?s=tt&exact=true&q=', status => 0, timeout => 10, user_agent => 'Mozilla/5.0', decode_html => 1, full_plot_url => 'http://www.imdb.com/rg/title-tease/plotsummary/title/tt', _also_known_as => [], _official_sites => [], _release_dates => [], _duration => [], _top_info => [], _cast => [], ); sub _get_default_attrs { keys %_defaults } sub _get_default_value { my($self, $attr) = @_; $_defaults{$attr}; } } =head2 Constructor =over 4 =item new() Object's constructor. You should pass as parameter movie title or IMDB code. my $imdb = new IMDB::Film(crit => ); or my $imdb = new IMDB::Film(crit => ); or my $imdb = new IMDB::Film(crit => ); For more infomation about base methods refer to IMDB::BaseClass. =item _init() Initialize object. =cut sub _init { my CLASS_NAME $self = shift; my %args = @_; croak "Film IMDB ID or Title should be defined!" if !$args{crit} && !$args{file}; $self->SUPER::_init(%args); $self->title(FORCED, \%args); unless($self->title) { $self->status(EMPTY_OBJECT); $self->error('Not Found'); return; } for my $prop (grep { /^_/ && !/^(_title|_code|_full_plot|_official_sites|_release_dates|_connections|_full_companies|_plot_keywords|_big_cover_url|_big_cover_page)$/ } sort keys %FIELDS) { ($prop) = $prop =~ /^_(.*)/; $self->$prop(FORCED); } } =back =head2 Options =over 4 =item year Define a movie's year. It's useful to use it to get the proper movie by its title: my $imdbObj = new IMDB::Film(crit => 'Jack', year => 2003); print "Got #" . $imdbObj->code . " " . $imdbObj->title . "\n"; #0379836 =item proxy defines proxy server name and port: proxy => 'http://proxy.myhost.com:80' By default object tries to get proxy from environment =item debug switches on debug mode to display useful debug messages. Can be 0 or 1 (0 by default) =item cache indicates use cache or not to store retrieved page content. Can be 0 or 1 (0 by default) =item cache_root specifies a directory to store cache data. By default it use /tmp/FileCache for *NIX OS =item cache_exp specifies an expiration time for cache. By default, it's 1 hour =item clear_cache indicates clear cached data before get request to IMDB.com or not =item timeout specifies a timeout for HTTP connection in seconds (10 sec by default) =item user_agent specifies an user agent for request ('Mozilla/5.0' by default) =item full_plot_url specifies a full plot url for specified movie =item host specifies a host name for IMDB site. By default it's www.imdb.com =item query specifies a query string to get specified movie by its ID. By defualt it's 'title/tt' =item search specifies query string to make a search movie by its title. By default it's 'find?tt=on;mx=20;q=' Example: my $imdb = new IMDB::Film( crit => 'Troy', user_agent => 'Opera/8.x', timeout => 2, debug => 1, cache => 1, cache_root => '/tmp/imdb_cache', cache_exp => '1 d', ); It'll create an object with critery 'Troy', user agent 'Opera', timeout 2 seconds, debug mode on, using cache with directory '/tmp/imdb_cache' and expiration time in 1 day. =cut sub full_plot_url { my CLASS_NAME $self = shift; if(@_) { $self->{full_plot_url} = shift } return $self->{full_plot_url} } sub fields { my CLASS_NAME $self = shift; return \%FIELDS; } =back =head2 Object Private Methods =over 4 =item _search_film() Implemets functionality to search film by name. =cut sub _search_film { my CLASS_NAME $self = shift; my $args = shift || {}; return $self->SUPER::_search_results('^\/title\/tt(\d+)', '/td', $args->{year}); } =back =head2 Object Public Methods =over 4 =item status() Indicates a status of IMDB object: 0 - empty object; 1 - loaded from file; 2 - loaded from internet request; 3 - loaded from cache. =item status_descr() Return a description for IMDB object status. Can be 'Empty', 'Filed', 'Fresh' and 'Cached': if($film->status) { print "This is a " . $film->status_descr . " object!"; } else { die "Cannot retrieve IMDB object!"; } =item title() Retrieve film title from film page. If was got search page instead of film page this method calls method _search_film to get list matched films and continue to process first one: my $title = $film->title(); =cut sub title { my CLASS_NAME $self = shift; my $forced = shift || 0; my $args = shift || {}; if($forced) { my $parser = $self->_parser(FORCED); $parser->get_tag('title'); my $title = $parser->get_text(); if($title =~ /Find \- IMDb/i) { $self->_show_message("Go to search page ...", 'DEBUG'); $title = $self->_search_film($args); } if($title) { $self->retrieve_code($parser, 'http://www.imdb.com/title/tt(\d+)') unless $self->code; $title =~ s/\*/\\*/g; $title = $self->_decode_special_symbols($title); $self->_show_message("title: $title", 'DEBUG'); # TODO: implement parsing of TV series like ALF (TV Series 1986–1990) $title =~ s/^imdb\s+\-\s+//i; ($self->{_title}, $self->{_year}, $self->{_kind}) = $title =~ m!(.*?)\s+\((\d{4})(?:/[IVX]+)\)(?:\s\((\w*)\))?!; unless($self->{_title}) { ($self->{_title}, $self->{_kind}, $self->{_year}) = $title =~ m!(.*?)\s+\((.*?)?\s?([0-9\-]*\s?)\)!; } $self->{_kind} = 'Movie' unless $self->{_kind}; # Default kind should be movie # "The Series" An Episode (2005) # "The Series" (2005) if( $self->{_title} =~ /\"[^\"]+\"(\s+.+\s+)?/ ) { $self->{_kind} = $1 ? 'E' : 'S'; } } } return $self->{_title}; } =item kind() Get kind of movie: my $kind = $film->kind(); Possible values are: 'movie', 'tv series', 'tv mini series', 'video game', 'video movie', 'tv movie', 'episode'. =cut sub kind { my CLASS_NAME $self = shift; return exists $FILM_KIND{$self->{_kind}} ? $FILM_KIND{$self->{_kind}} : lc($self->{_kind}); } =item year() Get film year: my $year = $film->year(); =cut sub year { my CLASS_NAME $self = shift; return $self->{_year}; } =item connections() Retrieve connections for the movie as an arrays of hashes with folloeing structure { follows => [ { id => , title => , year => , ..., } ], followed_by => [ { id => , title => , year => , ..., } ], references => [ { id => , title => , year => , ..., } ], referenced_in => [ { id => , title => , year => , ..., } ], featured_in => [ { id => , title => , year => , ..., } ], spoofed_by => [ { id => , title => , year => , ..., } ], } my %connections = %{ $film->connections() }; =cut sub connections { my CLASS_NAME $self = shift; unless($self->{_connections}) { my $page; $page = $self->_cacheObj->get($self->code . '_connections') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/trivia?tab=mc"; $self->_show_message("URL for movie connections is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_connections', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); my $group = undef; my %result; my @lookFor = ('h4'); while (my $tag = $parser->get_tag(@lookFor)) { if ($tag->[0] eq 'h4') { $group = HTML::Entities::encode_entities($parser->get_text); $group = lc($group); $group =~ s/\s+/_/g; $group =~ s/( |\?|\:)//; $group =~ s/&/and/; $result{$group} = []; @lookFor = ('h4', 'a', 'hr', 'hr/'); } elsif ($tag->[0] eq 'a') { my $id; ($id)= $tag->[1]->{href} =~ /(\d+)/ if $tag->[1]->{href}; my $name = $parser->get_trimmed_text; # Handle series episodes (usually in 'referenced' sections) my($series,$t,$s,$e) = ($name =~ /^(.*?): *(.*?) *\(?#(\d+)\.(\d+)\)?$/); $name = $series if defined $series; $tag = $parser->get_tag('/a'); my $next = $parser->get_trimmed_text(); my %film = ('id' => $id, 'title' => $name); if(defined $t) { $film{'series_title'} = $t; $film{'season'} = $s; $film{'episode'} = $e; } $film{'year'} = $1 if $next =~ /\((\d{4})\)/; next if ($next =~ /\(VG\)/); push @{$result{$group}}, \%film; } else { # Stop when we hit the divider last; } } $self->{_connections} = \%result; } return $self->{_connections}; } =item full_companies() Retrieve companies for the movie as an array where each item has following stucture: { production => [ { name => , url => , extra => } ], distributors => [ { name => , url => , extra => } ], special_effects => [ { name => , url => , extra => } ], other => [ { name => , url => , extra => } ], } my %full_companies = %{ $film->full_companies() }; =cut sub full_companies { my CLASS_NAME $self = shift; unless($self->{_full_companies}) { my $page; $page = $self->_cacheObj->get($self->code . '_full_companies') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/companycredits"; $self->_show_message("URL for company credits is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_full_companies', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); my $group = undef; my %result; my @lookFor = ('h2'); while (my $tag = $parser->get_tag(@lookFor)) { if ($tag->[0] eq 'h2') { $group = $parser->get_text; $group =~ s/ compan(y|ies)//i; $group =~ tr/A-Z/a-z/; $group =~ s/\s+/_/g; $result{$group} = []; @lookFor = ('h2', 'a', 'hr', 'hr/'); } elsif($tag->[0] eq 'a') { my($url) = $tag->[1]->{href}; my $name = $parser->get_trimmed_text; $tag = $parser->get_tag('/a'); my $next = $parser->get_trimmed_text(); $next =~ s/^[\t \xA0]+//; # nbsp comes out as \xA0 my %company = ( 'url' => $url, 'name' => $name, 'extra' => $next ); push @{$result{$group}}, \%company; } else { # Stop when we hit the divider last; } } $self->{_full_companies} = \%result; } return $self->{_full_companies}; } =item company() Returns a list of companies given for a specified movie: my $company = $film->company(); or my @companies = $film->company(); =cut sub company { my CLASS_NAME $self = shift; unless($self->{_company}) { my @companies = split /\s?\,\s?/, $self->_get_simple_prop('Production Co'); $self->{_company} = \@companies; } return wantarray ? $self->{_company} : $self->{_company}[0]; } =item episodes() Retrieve episodes info list each element of which is hash reference for tv series - { id => , title => , season => <Season>, episode => <Episode>, date => <Date>, plot => <Plot> }: my @episodes = @{ $film->episodes() }; =cut sub episodes { my CLASS_NAME $self = shift; return [] if !$self->kind or $self->kind !~ /tv serie/i; unless($self->{_episodes}) { my $page; $page = $self->_cacheObj->get($self->code . '_episodes') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/epcast"; $self->_show_message("URL for episodes is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_episodes', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); while(my $tag = $parser->get_tag('h4')) { my $id; my($season, $episode); next unless(($season, $episode) = $parser->get_text =~ /Season\s+(.*?),\s+Episode\s+([^:]+)/); my $imdb_tag = $parser->get_tag('a'); ($id) = $imdb_tag->[1]->{href} =~ /(\d+)/ if $imdb_tag->[1]->{href}; my $title = $parser->get_trimmed_text; $parser->get_tag('b'); my($date) = $parser->get_trimmed_text; $parser->get_tag('br'); my $plot = $parser->get_trimmed_text; push @{ $self->{_episodes} }, { season => $season, episode => $episode, id => $id, title => $title, date => $date, plot => $plot }; } } return $self->{_episodes}; } =item episodeof() Retrieve parent tv series list each element of which is hash reference for episode - { id => <ID>, title => <Title>, year => <Year> }: my @tvseries = @{ $film->episodeof() }; =cut sub episodeof { my CLASS_NAME $self = shift; my $forced = shift || 0; return if !$self->kind or $self->kind ne "episode"; if($forced) { my($episodeof, $title, $year, $episode, $season, $id); my($parser) = $self->_parser(FORCED); while($parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /^TV Series/i; } while(my $tag = $parser->get_tag('a')) { ($title, $year) = ($1, $2) if $parser->get_text =~ m!(.*?)\s+\(([\d\?]{4}).*?\)!; last unless $tag->[1]{href} =~ /title/i; ($id) = $tag->[1]{href} =~ /(\d+)/; } #start again $parser = $self->_parser(FORCED); while($parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /^Original Air Date/i; } $parser->get_token; ($season, $episode) = $parser->get_text =~ /\(Season\s+(\d+),\s+Episode\s+(\d+)/; push @{ $self->{_episodeof} }, {title => $title, year => $year, id => $id, season => $season, episode => $episode}; } return $self->{_episodeof}; } =item cover() Retrieve url of film cover: my $cover = $film->cover(); =cut sub cover { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); my $cover; my $title = quotemeta($self->title); while(my $img_tag = $parser->get_tag('img')) { $img_tag->[1]{alt} ||= ''; last if $img_tag->[1]{alt} =~ /^poster not submitted/i; if($img_tag->[1]{alt} =~ /Poster$/) { $cover = $img_tag->[1]{src}; last; } } $self->{_cover} = $cover; } return $self->{_cover}; } sub top_info { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced or !$self->{'_top_info'}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('div')) { last if $tag->[1]->{class} && $tag->[1]->{class} eq 'article highlighted'; } my $text = $parser->get_trimmed_text('span'); my @top_items = split /\s?\|\s?/, $text; $self->{_top_info} = \@top_items; } return $self->{_top_info}; } =item recommendation_movies() Return a list of recommended movies for specified one as a hash where each key is a movie ID in IMDB and value - movie's title: $recommendation_movies = $film->recommendation_movies(); For example, the list of recommended movies for Troy will be similar to that: __DATA__ $VAR1 = { '0416449' => '300', '0167260' => 'The Lord of the Rings: The Return of the King', '0442933' => 'Beowulf', '0320661' => 'Kingdom of Heaven', '0172495' => 'Gladiator' }; =cut sub recommendation_movies { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('h2')) { my $text = $parser->get_text(); last if $text =~ /recommendations/i; } my %result = (); while(my $tag = $parser->get_tag()) { last if $tag->[0] eq '/table'; my $text = $parser->get_text(); if($tag->[0] eq 'a' && $text && $tag->[1]{href} =~ /tt(\d+)/) { $result{$1} = $text; } } $self->{_recommendation_movies} = \%result; } return $self->{_recommendation_movies}; } =item directors() Retrieve film directors list each element of which is hash reference - { id => <ID>, name => <Name> }: my @directors = @{ $film->directors() }; =cut sub directors { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my ($parser) = $self->_parser(FORCED); my (@directors, $tag); while($tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text; last if $text =~ /direct(?:ed|or)/i; } while ($tag = $parser->get_tag() ) { my $text = $parser->get_text(); last if $text =~ /^writ(?:ing|ers)/i or $tag->[0] eq '/div'; if($tag->[0] eq 'a' && $tag->[1]{href} && $text !~ /(img|more)/i) { my($id) = $tag->[1]{href} =~ /(\d+)/; push @directors, {id => $id, name => $text}; } } $self->{_directors} = \@directors; } return $self->{_directors}; } =item writers() Retrieve film writers list each element of which is hash reference - { id => <ID>, name => <Name> }: my @writers = @{ $film->writers() }; <I>Note: this method returns Writing credits from movie main page. It maybe not contain a full list!</I> =cut sub writers { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my ($parser) = $self->_parser(FORCED); my (@writers, $tag); while($tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /writ(?:ing|ers|er)/i; } while($tag = $parser->get_tag()) { my $text = $parser->get_text(); last if $tag->[0] eq '/div'; if($tag->[0] eq 'a' && $tag->[1]{href} && $text !~ /more/i && $text !~ /img/i) { if(my($id) = $tag->[1]{href} =~ /nm(\d+)/) { push @writers, {id => $id, name => $text}; } } } $self->{_writers} = \@writers; } return $self->{_writers}; } =item genres() Retrieve film genres list: my @genres = @{ $film->genres() }; =cut sub genres { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my ($parser) = $self->_parser(FORCED); my (@genres); while(my $tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /^genre/i; } while(my $tag = $parser->get_tag('a')) { my $genre = $parser->get_text; last unless $tag->[1]{href} =~ m!/genre/!i; last if $genre =~ /more/i; push @genres, $genre; } $self->{_genres} = \@genres; } return $self->{_genres}; } =item tagline() Retrieve film tagline: my $tagline = $film->tagline(); =cut sub tagline { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my ($parser) = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { last if($parser->get_text =~ /tagline/i); } $self->{_tagline} = $parser->get_trimmed_text(MAIN_TAG, 'a'); } return $self->{_tagline}; } =item plot() Returns a movie plot: my $plot = $film->plot; =cut sub plot { my CLASS_NAME $self = shift; return $self->{_plot}; } =item storyline() Retrieve film plot summary: my $storyline = $film->storyline(); =cut sub storyline { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('h2')) { last if $parser->get_text =~ /^storyline$/i; } my $plot = $parser->get_trimmed_text(MAIN_TAG, 'em'); $self->{_storyline} = $self->_decode_special_symbols($plot); } return $self->{_storyline}; } =item rating() In scalar context returns film user rating, in array context returns film rating, number of votes and info about place in TOP 250 or some other TOP and avards: my $rating = $film->rating(); or my($rating, $vnum, $avards) = $film->rating(); print "RATING: $rating ($vnum votes)"; Note, that $avards is array reference where the first elemen is a TOP info if so, and the next element is other avards - Oscar, nominations and etc =cut sub rating { my CLASS_NAME $self = shift; my ($forced) = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag('div')) { last if $tag->[1]{class} && $tag->[1]{class} eq 'star-box-details'; } my $text = $parser->get_trimmed_text('/a'); my($rating, $val) = $text =~ m!(\d+\.?\d*)/10.*?(\d+,?\d*)!; $val =~ s/\,// if $val; $self->{_rating} = [$rating, $val, $self->top_info]; unless($self->{_plot}) { my $tag = $parser->get_tag('p'); my $text = $parser->get_trimmed_text('/p'); $self->{_plot} = $text; } } return wantarray ? @{ $self->{_rating} } : $self->{_rating}[0]; } =item cast() Retrieve film cast list each element of which is hash reference - { id => <ID>, name => <Full Name>, role => <Role> }: my @cast = @{ $film->cast() }; <I> Note: this method retrieves a cast list first billed only! </I> =cut sub cast { my CLASS_NAME $self = shift; my ($forced) = shift || 0; if($forced) { my (@cast, $tag, $person, $id, $role); my $parser = $self->_parser(FORCED); while($tag = $parser->get_tag('table')) { last if $tag->[1]->{class} && $tag->[1]->{class} =~ /^cast_list$/i; } while($tag = $parser->get_tag()) { last if $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /fullcredits/i; if($tag->[0] eq 'td' && $tag->[1]{class} && $tag->[1]{class} eq 'name') { $tag = $parser->get_tag('a'); if($tag->[1]{href} && $tag->[1]{href} =~ m#name/nm(\d+?)/#) { $person = $parser->get_text; $id = $1; my $text = $parser->get_trimmed_text('/tr'); ($role) = $text =~ /.*?\s+(.*)$/; push @cast, {id => $id, name => $person, role => $role}; } } } $self->{_cast} = \@cast; } return $self->{_cast}; } =item duration() In the scalar context it retrieves a film duration in minutes (the first record): my $duration = $film->duration(); In array context it retrieves all movie's durations: my @durations = $film->duration(); =cut sub duration { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text(); last if $text =~ /runtime:/i; } my $duration_str = $self->_decode_special_symbols($parser->get_trimmed_text(MAIN_TAG, '/div')); my @runtime = split /\s+(\/|\|)\s+/, $duration_str; $self->{_duration} = \@runtime; } return wantarray ? @{ $self->{_duration} } : $self->{_duration}->[0]; } =item country() Retrieve film produced countries list: my $countries = $film->country(); =cut sub country { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my $parser = $self->_parser(FORCED); while (my $tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /country/i; } my (@countries); while(my $tag = $parser->get_tag()) { if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ m!/country/[a-z]{2}!i ) { my $text = $parser->get_text(); $text =~ s/\n//g; push @countries, $text; } last if $tag->[0] eq 'br'; } $self->{_country} = \@countries; } return $self->{_country} } =item language() Retrieve film languages list: my $languages = $film->language(); =cut sub language { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my (@languages, $tag); my $parser = $self->_parser(FORCED); while ($tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /language/i; } while($tag = $parser->get_tag()) { if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ m!/language/[a-z]{2}!i ) { my $text = $parser->get_text(); $text =~ s/\n//g; push @languages, $text; } last if $tag->[0] eq '/div'; } $self->{_language} = \@languages; } return $self->{_language}; } =item also_known_as() Retrieve AKA information as array, each element of which is string: my $aka = $film->also_known_as(); print map { "$_\n" } @$aka; =cut sub also_known_as { my CLASS_NAME $self= shift; unless($self->{_also_known_as}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text(); $self->_show_message("AKA: $text", 'DEBUG'); last if $text =~ /^(aka|also known as)/i; } my $aka = $parser->get_trimmed_text('span'); $self->_show_message("AKA: $aka", 'DEBUG'); my @aka = ($aka); $self->{_also_known_as} = \@aka; } return $self->{_also_known_as}; } =item trivia() Retrieve a movie trivia: my $trivia = $film->trivia(); =cut sub trivia { my CLASS_NAME $self = shift; $self->{_trivia} = $self->_get_simple_prop('trivia') unless $self->{_trivia}; return $self->{_trivia}; } =item goofs() Retrieve a movie goofs: my $goofs = $film->goofs(); =cut sub goofs { my CLASS_NAME $self = shift; $self->{_goofs} = $self->_get_simple_prop('goofs') unless($self->{_goofs}); return $self->{_goofs}; } =item awards() Retrieve a general information about movie awards like 1 win & 1 nomination: my $awards = $film->awards(); =cut sub awards { my CLASS_NAME $self = shift; return $self->{_top_info}; } =item mpaa_info() Return a MPAA for the specified move: my mpaa = $film->mpaa_info(); =cut sub mpaa_info { my CLASS_NAME $self = shift; unless($self->{_mpaa_info}) { my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_trimmed_text(MAIN_TAG, '/a'); last if $text =~ /^Motion Picture Rating/i; } my $mpaa = $parser->get_trimmed_text('/span'); $mpaa =~ s/^\)\s//; $self->{_mpaa_info} = $mpaa; } return $self->{_mpaa_info}; } =item aspect_ratio() Returns an aspect ratio of specified movie: my $aspect_ratio = $film->aspect_ratio(); =cut sub aspect_ratio { my CLASS_NAME $self = shift; $self->{_aspect_ratio} = $self->_get_simple_prop('aspect ratio') unless $self->{_aspect_ratio}; return $self->{_aspect_ratio}; } =item summary() Retrieve film user summary: my $descr = $film->summary(); =cut sub summary { my CLASS_NAME $self = shift; my $forced = shift || 0; if($forced) { my($tag, $text); my($parser) = $self->_parser(FORCED); while($tag = $parser->get_tag('b')) { $text = $parser->get_text(); last if $text =~ /^summary/i; } $text = $parser->get_text('b', 'a'); $self->{_summary} = $text; } return $self->{_summary}; } =item certifications() Retrieve list of film certifications each element of which is hash reference - { country => certificate }: my @cert = $film->certifications(); =cut sub certifications { my CLASS_NAME $self = shift; my $forced = shift || 0; my (%cert_list, $tag); if($forced) { my $parser = $self->_parser(FORCED); while($tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /certification/i; } while($tag = $parser->get_tag()) { if($tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /certificates/i) { my $text = $parser->get_text(); $text =~ s/\n//g; my($country, $range) = split /\:/, $text; $cert_list{$country} = $range; } last if $tag->[0] eq '/td'; } $self->{_certifications} = \%cert_list; } return $self->{_certifications}; } =item full_plot Return full movie plot. my $full_plot = $film->full_plot(); =cut sub full_plot { my CLASS_NAME $self = shift; $self->_show_message("Getting full plot ".$self->code."; url=".$self->full_plot_url." ...", 'DEBUG'); # # TODO: move all methods which needed additional connection to the IMDB.com # to the separate module. # unless($self->{_full_plot}) { my $page; $page = $self->_cacheObj->get($self->code.'_plot') if $self->_cache; unless($page) { my $url = $self->full_plot_url . $self->code() . '/plotsummary'; $self->_show_message("URL is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); unless($page) { return; } $self->_cacheObj->set($self->code.'_plot', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); my($text); while(my $tag = $parser->get_tag('p')) { if(defined $tag->[1]{class} && $tag->[1]{class} =~ /plotpar/i) { $text = $parser->get_trimmed_text(); last; } } $self->{_full_plot} = $text; } return $self->{_full_plot}; } sub big_cover { my CLASS_NAME $self = shift; unless($self->{'_big_cover_url'}) { unless($self->{'_big_cover_page'}) { my $parser = $self->_parser(FORCED); my $regexp = '^/media/.+/tt' . $self->code . '$'; while(my $tag = $parser->get_tag('a')) { $self->_show_message("$regexp --> " . $tag->[1]->{href}, 'DEBUG'); if($tag->[1]->{'href'} =~ m!$regexp!) { $self->{'_big_cover_page'} = $tag->[1]->{'href'}; last; } } } if($self->{'_big_cover_page'}) { my $page = $self->_get_page_from_internet('http://' . $self->{'host'} . $self->{'_big_cover_page'}); return unless $page; my $parser = $self->_parser(FORCED, \$page); while(my $tag = $parser->get_tag('img')) { if($tag->[1]->{'id'} && $tag->[1]->{'id'} eq 'primary-img') { $self->{'_big_cover_url'} = $tag->[1]->{'src'}; last; } } } } return $self->{_big_cover_url}; } =item official_sites() Returns a list of official sites of specified movie as array reference which contains hashes with site information - URL => Site Title: my $sites = $film->official_sites(); for(@$sites) { print "Site name - $_->{title}; url - $_->{url}\n"; } =cut sub official_sites { my CLASS_NAME $self = shift; unless($self->{_official_sites}) { my $page; $page = $self->_cacheObj->get($self->code . '_sites') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/officialsites"; $self->_show_message("URL for sites is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_sites', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); while(my $tag = $parser->get_tag()) { last if $tag->[0] eq 'ol'; } while(my $tag = $parser->get_tag()) { my $text = $parser->get_text(); if($tag->[0] eq 'a' && $tag->[1]->{href} !~ /sections/i) { push @{ $self->{_official_sites} }, { $tag->[1]->{href} => $text }; } last if $tag->[0] eq '/ol' or $tag->[0] eq 'hr'; } } return $self->{_official_sites}; } =item release_dates() Returns a list of release dates of specified movie as array reference: my $sites = $film->release_dates(); for(@$sites) { print "Country - $_->{country}; release date - $_->{date}; info - $_->{info}\n"; } Option info contains additional information about release - DVD premiere, re-release, restored version etc =cut sub release_dates { my CLASS_NAME $self = shift; unless($self->{_release_dates}) { my $page; $page = $self->_cacheObj->get($self->code . '_dates') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/releaseinfo"; $self->_show_message("URL for sites is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_dates', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); # Searching header of release dates table while(my $tag = $parser->get_tag('th')) { last if $tag->[1]->{class} && $tag->[1]->{class} eq 'xxxx'; } # # The table has three columns. So we parse then one by one and grab their text # my $count = 0; my @dates = (); while(my $tag = $parser->get_tag()) { last if $tag->[0] eq '/table'; next unless $tag->[0] eq 'td'; $dates[$count] = $parser->get_trimmed_text('/td'); # When rish 3rd column we should store dates into object property if(++$count > 2) { $dates[2] =~ s/\)\s\(/, /g; $dates[2] =~ s/(\(|\))//g; push @{ $self->{_release_dates} }, {country => $dates[0], date => $dates[1], info => $dates[2]}; $count = 0; } } } return $self->{_release_dates}; } =item Retrieve a list of plot keywords as an array reference: my $plot_keywords = $film->plot_keywords(); for my $keyword (@$plot_keywords) { print "keyword: $keyword\n"; } =cut sub plot_keywords { my CLASS_NAME $self = shift; unless($self->{_plot_keywords}) { my $page; $page = $self->_cacheObj->get($self->code . '_keywords') if $self->_cache; unless($page) { my $url = "http://". $self->{host} . "/" . $self->{query} . $self->code . "/keywords"; $self->_show_message("URL for sites is $url ...", 'DEBUG'); $page = $self->_get_page_from_internet($url); $self->_cacheObj->set($self->code.'_keywords', $page, $self->_cache_exp) if $self->_cache; } my $parser = $self->_parser(FORCED, \$page); my @keywords = (); while(my $tag = $parser->get_tag('a')) { my $text = $parser->get_text(); $text = $self->_decode_special_symbols($text); #$self->_show_message("*** $tag->[1]->{href} --> $text ***", 'DEBUG'); push @keywords, $text if $tag->[1]->{href} && $tag->[1]->{href} =~ m#/keyword/#; } $self->{_plot_keywords} = \@keywords; } return $self->{_plot_keywords}; } =back =cut sub DESTROY { my CLASS_NAME $self = shift; } 1; __END__ =head2 Class Variables =over 4 =item %FIELDS Contains list all object's properties. See description of pragma C<fields>. =item @FILM_CERT Matches USA film certification notation and age. =back =head1 EXPORTS Nothing =head1 HOWTO CACTH EXCEPTIONS If it's needed to get information from IMDB for a list of movies in some case it can be returned critical error: [CRITICAL] Cannot retrieve page: 500 Can't read entity body ... To catch an exception can be used eval: for my $search_crit ("search_crit1", "search_crit2", ..., "search_critN") { my $ret; eval { $ret = new IMDB::Film(crit => "$search_crit") || print "UNKNOWN ERROR\n"; }; if($@) { # Opsssss! We got an exception! print "EXCEPTION: $@!"; next; } } =head1 BUGS Please, send me any found bugs by email: stepanov.michael@gmail.com or create a bug report: http://rt.cpan.org/NoAuth/Bugs.html?Dist=IMDB-Film =head1 SEE ALSO IMDB::Persons IMDB::BaseClass WWW::Yahoo::Movies IMDB::Movie HTML::TokeParser http://videoguide.sf.net =head1 AUTHOR Michael Stepanov AKA nite_man (stepanov.michael@gmail.com) =head1 COPYRIGHT Copyright (c) 2004 - 2007, Michael Stepanov. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. =cut ����������������������������������������������������������������������������������������������������������IMDB-Film-0.53/lib/IMDB/BaseClass.pm����������������������������������������������������������������0000644�0001750�0001750�00000032404�12071070351�016305� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������=head1 NAME IMDB::BaseClass - a base class for IMDB::Film and IMDB::Persons. =head1 SYNOPSIS use base qw(IMDB::BaseClass); =head1 DESCRIPTION IMDB::BaseClass implements a base functionality for IMDB::Film and IMDB::Persons. =cut package IMDB::BaseClass; use strict; use warnings; use HTML::TokeParser; use LWP::Simple qw($ua get); use Cache::FileCache; use Text::Unidecode qw(unidecode); use HTML::Entities; use Carp; use Data::Dumper; use constant MAIN_TAG => 'h4'; use constant ID_LENGTH => 6; use vars qw($VERSION %FIELDS $AUTOLOAD %STATUS_DESCR); BEGIN { $VERSION = '0.53'; %STATUS_DESCR = ( 0 => 'Empty', 1 => 'Filed', 2 => 'Fresh', 3 => 'Cached', ); } use constant FORCED => 1; use constant CLASS_NAME => 'IMDB::BaseClass'; use constant FROM_FILE => 1; use constant FROM_INTERNET => 2; use constant FROM_CACHE => 3; use fields qw( content parser matched proxy error cache host query search cacheObj cache_exp cache_root clear_cache debug status file timeout user_agent decode_html exact _code ); =head2 Constructor and initialization =over 4 =item new() Object's constructor. You should pass as parameter movie title or IMDB code. my $imdb = new IMDB::Film(crit => <some code>); or my $imdb = new IMDB::Film(crit => <some title>); Also, you can specify following optional parameters: - proxy - define proxy server name and port; - debug - switch on debug mode (on by default); - cache - cache or not of content retrieved pages. =cut sub new { my $caller = shift; my $class = ref($caller) || $caller; my $self = fields::new($class); $self->_init(@_); return $self; } =item _init() Initialize object. It gets list of service class properties and assign value to them from input parameters or from the hash with default values. =cut sub _init { my CLASS_NAME $self = shift; my %args = @_; no warnings 'deprecated'; for my $prop ( keys %{ $self->fields } ) { unless($prop =~ /^_/) { $self->{$prop} = defined $args{$prop} ? $args{$prop} : $self->_get_default_value($prop); } } if($self->_cache()) { $self->_cacheObj( new Cache::FileCache( { default_expires_in => $self->_cache_exp, cache_root => $self->_cache_root } ) ); $self->_cacheObj->clear() if $self->_clear_cache; } if($self->_proxy) { $ua->proxy(['http', 'ftp'], $self->_proxy()) } else { $ua->env_proxy() } $ua->timeout($self->timeout); $ua->agent($self->user_agent); $self->_content( $args{crit} ); $self->_parser(); } =item user_agent() Define an user agent for HTTP request. It's 'Mozilla/5.0' by default. For more information refer to LWP::UserAgent. =cut sub user_agent { my CLASS_NAME $self = shift; if(@_) { $self->{user_agent} = shift } return $self->{user_agent} } =item timeout() Define a timeout for HTTP request in seconds. By default it's 10 sec. For more information refer to LWP::UserAgent. =cut sub timeout { my CLASS_NAME $self = shift; if(@_) { $self->{timeout} = shift } return $self->{timeout} } =item code() Get IMDB film code. my $code = $film->code(); =cut sub code { my CLASS_NAME $self = shift; if(@_) { $self->{_code} = shift } return $self->{_code}; } =item id() Get IMDB film id (actually, it's the same as code). my $id = $film->id(); =cut sub id { my CLASS_NAME $self = shift; if(@_) { $self->{_code} = shift } return $self->{_code}; } =item _proxy() Store address of proxy server. You can pass a proxy name as parameter into object constructor: my $imdb = new IMDB::Film(code => 111111, proxy => 'my.proxy.host:8080'); or you can define environment variable 'http_host'. For exanple, for Linux you shoud do a following: export http_proxy=my.proxy.host:8080 =cut sub _proxy { my CLASS_NAME $self = shift; if(@_) { $self->{proxy} = shift } return $self->{proxy}; } sub _decode_html { my CLASS_NAME $self = shift; if(@_) { $self->{decode_html} = shift } return $self->{decode_html}; } =item _cache() Store cache flag. Indicate use file cache to store content page or not: my $imdb = new IMDB::Film(code => 111111, cache => 1); =cut sub _cache { my CLASS_NAME $self = shift; if(@_) { $self->{cache} = shift } return $self->{cache} } =item _clear_cache Store flag clear_cache which is indicated clear exisisting cache or not (false by default): my $imdb = new IMDB::Film(code => 111111, cache => 1, clear_cache => 1); =cut sub _clear_cache { my CLASS_NAME $self = shift; if($_) { $self->{clear_cache} = shift } return $self->{clear_cache}; } =item _cacheObj() In case of using cache, we create new Cache::File object and store it in object's propery. For more details about Cache::File please see Cache::Cache documentation. =cut sub _cacheObj { my CLASS_NAME $self = shift; if(@_) { $self->{cacheObj} = shift } return $self->{cacheObj} } =item _cache_exp() In case of using cache, we can define value time of cache expire. my $imdb = new IMDB::Film(code => 111111, cache_exp => '1 h'); For more details please see Cache::Cache documentation. =cut sub _cache_exp { my CLASS_NAME $self = shift; if(@_) { $self->{cache_exp} = shift } return $self->{cache_exp} } sub _cache_root { my CLASS_NAME $self = shift; $self->{cache_root} = shift if @_; $self->_show_message("CACHE ROOT is " . $self->{cache_root}, 'DEBUG'); return $self->{cache_root}; } sub _show_message { my CLASS_NAME $self = shift; my $msg = shift || 'Unknown error'; my $type = shift || 'ERROR'; return if $type =~ /^debug$/i && !$self->_debug(); if($type =~ /(debug|info|warn)/i) { carp "[$type] $msg" } else { croak "[$type] $msg" } } =item _host() Store IMDB host name. You can pass this value in object constructor: my $imdb = new IMDB::Film(code => 111111, host => 'us.imdb.com'); By default, it uses 'www.imdb.com'. =cut sub _host { my CLASS_NAME $self = shift; if(@_) { $self->{host} = shift } return $self->{host} } =item _query() Store query string to retrieve film by its ID. You can define different value for that: my $imdb = new IMDB::Film(code => 111111, query => 'some significant string'); Default value is 'title/tt'. B<Note: this is a mainly service parameter. So, there is no reason to pass it in the real case.> =cut sub _query { my CLASS_NAME $self = shift; if(@_) { $self->{query} = shift } return $self->{query} } =item _search() Store search string to find film by its title. You can define different value for that: my $imdb = new IMDB::Film(code => 111111, seach => 'some significant string'); Default value is 'Find?select=Titles&for='. =cut sub _search { my CLASS_NAME $self = shift; if(@_) { $self->{search} = shift } return $self->{search} } sub _exact { my CLASS_NAME $self = shift; if(@_) { $self->{exact} = shift } return $self->{exact}; } =item _debug() Indicate to use DEBUG mode to display some debug messages: my $imdb = new IMDB::Film(code => 111111, debug => 1); By default debug mode is switched off. =cut sub _debug { my CLASS_NAME $self = shift; if(@_) { $self->{debug} = shift } return $self->{debug} } =item _content() Connect to the IMDB, retrieve page according to crit: by film IMDB ID or its title and store content of that page in the object property. In case using cache, first check if page was already stored in the cache then retrieve page from the cache else store content of the page in the cache. =cut sub _content { my CLASS_NAME $self = shift; if(@_) { my $crit = shift || ''; my $page; $self->code($crit) if $crit =~ /^\d{6,8}$/; $page = $self->_cacheObj()->get($crit) if $self->_cache(); $self->_show_message("CRIT: $crit", 'DEBUG'); unless($page) { if( -f $crit ) { $self->_show_message("Parse IMDB HTML file ...", 'DEBUG'); local $/; undef $/; open FILE, $crit or die "Cannot open off-line IMDB file: $!!"; $page = <FILE>; close FILE; $self->status(FROM_FILE); } else { $self->_show_message("Retrieving page from internet ...", 'DEBUG'); my $url = 'http://'.$self->_host().'/'. ($crit =~ /^\d+$/ && length($crit) >= ID_LENGTH ? $self->_query() : $self->_search()) . $crit; $page = $self->_get_page_from_internet($url); $self->status(FROM_INTERNET); } $self->_cacheObj()->set($crit, $page, $self->_cache_exp()) if $self->_cache(); } else { $self->_show_message("Retrieving page from cache ...", 'DEBUG'); $self->status(FROM_CACHE); } $self->{content} = \$page; } $self->{content}; } sub _get_page_from_internet { my CLASS_NAME $self = shift; my $url = shift; $self->_show_message("URL is [$url]...", 'DEBUG'); my $page = get($url); unless($page) { $self->error("Cannot retieve an url: [$url]!"); $self->_show_message("Cannot retrieve url [$url]", 'CRITICAL'); } return $page; } =item _parser() Setup HTML::TokeParser and store. To have possibility to inherite that class we should every time initialize parser using stored content of page. For more information please see HTML::TokeParser documentation. =cut sub _parser { my CLASS_NAME $self = shift; my $forced = shift || 0; my $page = shift || undef; if($forced) { my $content = defined $page ? $page : $self->_content(); my $parser = new HTML::TokeParser($content) or croak "[CRITICAL] Cannot create HTML parser: $!!"; $self->{parser} = $parser; } return $self->{parser}; } =item _get_simple_prop() Retrieve a simple movie property which surrownded by <B>. =cut sub _get_simple_prop { my CLASS_NAME $self = shift; my $target = shift || ''; my $parser = $self->_parser(FORCED); while(my $tag = $parser->get_tag(MAIN_TAG)) { my $text = $parser->get_text; $self->_show_message("[$tag->[0]] $text --> $target", 'DEBUG'); last if $text =~ /$target/i; } my $end_tag = '/a'; $end_tag = '/div' if $target eq 'trivia'; $end_tag = 'span' if $target eq 'Production Co'; $end_tag = '/div' if $target eq 'aspect ratio'; my $res = $parser->get_trimmed_text($end_tag); $res =~ s/\s+(see )?more$//i; $self->_show_message("RES: $res", 'DEBUG'); $res = $self->_decode_special_symbols($res); return $res; } sub _search_results { my CLASS_NAME $self = shift; my $pattern = shift || croak 'Please, specify search pattern!'; my $end_tag = shift || '/li'; my $year = shift; my(@matched, @guess_res, %matched_hash); my $parser = $self->_parser(); my $count = 0; while( my $tag = $parser->get_tag('a') ) { my $href = $tag->[1]{href}; my $title = $parser->get_trimmed_text('a', $end_tag); $self->_show_message("TITLE: " . $title, 'DEBUG'); next if $title =~ /\[IMG\]/i or !$href or $href =~ /pro.imdb.com/; # Remove garbage from the first title $title =~ s/(\n|\r)//g; $title =~ s/\s*\.media_strip_thumbs.*//m; if(my($id) = $href =~ /$pattern/) { $matched_hash{$id} = {title => $title, 'pos' => $count++}; @guess_res = ($id, $title) if $year && $title =~ /$year/ && !@guess_res; } } @matched = map { {title => $matched_hash{$_}->{title}, id => $_} } sort { $matched_hash{$a}->{'pos'} <=> $matched_hash{$b}->{'pos'} } keys %matched_hash; $self->matched(\@matched); $self->_show_message("matched: " . Dumper(\@matched), 'DEBUG'); $self->_show_message("guess: " . Dumper(\@guess_res), 'DEBUG'); my($title, $id); if(@guess_res) { ($id, $title) = @guess_res; } else { $title = $matched[0]->{title}; $id = $matched[0]->{id}; } $self->_content($id); $self->_parser(FORCED); return $title; } =item matched() Retrieve list of matched films each element of which is hash reference - { id => <Film ID>, title => <Film Title>: my @matched = @{ $film->matched() }; Note: if movie was matched by title unambiguously it won't be present in this array! =cut sub matched { my CLASS_NAME $self = shift; if(@_) { $self->{matched} = shift } return $self->{matched}; } sub status { my CLASS_NAME $self = shift; if(@_) { $self->{status} = shift } return $self->{status}; } sub status_descr { my CLASS_NAME $self = shift; return $STATUS_DESCR{$self->{status}} || $self->{status}; } sub retrieve_code { my CLASS_NAME $self = shift; my $parser = shift; my $pattern = shift; my($id, $tag); while($tag = $parser->get_tag('link')) { if($tag->[1]{href} && $tag->[1]{href} =~ m!$pattern!) { $self->code($1); last; } } } =item error() Return string which contains error messages separated by \n: my $errors = $film->error(); =cut sub error { my CLASS_NAME $self = shift; if(@_) { push @{ $self->{error} }, shift() } return join("\n", @{ $self->{error} }) if $self->{error}; } sub _decode_special_symbols { my($self, $text) = @_; if($self->_decode_html) { $text = unidecode(decode_entities($text)); } return $text; } sub AUTOLOAD { my $self = shift; my($class, $method) = $AUTOLOAD =~ /(.*)::(.*)/; my($pack, $file, $line) = caller; carp "Method [$method] not found in the class [$class]!\n Called from $pack at line $line"; } sub DESTROY { my $self = shift; } 1; __END__ =back =head1 EXPORTS Nothing =head1 BUGS Please, send me any found bugs by email: stepanov.michael@gmail.com. =head1 SEE ALSO IMDB::Persons IMDB::Film WWW::Yahoo::Movies HTML::TokeParser =head1 AUTHOR Mikhail Stepanov AKA nite_man (stepanov.michael@gmail.com) =head1 COPYRIGHT Copyright (c) 2004 - 2007, Mikhail Stepanov. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. =cut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/README�������������������������������������������������������������������������������0000644�0001750�0001750�00000002342�11730353345�013514� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film ====================== IMDB::Film is OO Perl interface to the database of films IMDB (www.imdb.com). It allows to retrieve information about movies by its IMDB code or title. Also, there is a possibility to get information about IMDB persons (actors, actresses, directors etc) by their name of code. For more details please read POD of that module. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install To install this module in the specific path use: perl Makefile.PL PREFIX=/path/to/your/lib To install the module in your home directory use that command: perl Makefile.PL PREFIX=YOU_HOME/path/to/your/lib Note: you don't need to have a root privileges to do that! Also, you can use CPAN shell: > perl -MCPAN -e shell cpan> install IMDB::Film or use command 'cpan': > cpan install IMDB::Film DEPENDENCIES This module requires these other modules and libraries: HTML::TokeParser LWP::Simple Cache::Cache AUTHOR Michael Stepanov (stepanov.michael@gmail.com) COPYRIGHT AND LICENCE Copyright (C) 2004 - 2010 by Michael Stepanov. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/Makefile.PL��������������������������������������������������������������������������0000644�0001750�0001750�00000002762�12071605020�014601� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������use ExtUtils::MakeMaker; use strict; my $online_tests = ExtUtils::MakeMaker::prompt('Do you want to perform online tests during "make test" phase?', 'no') =~ /^\s*(y)/i; my $tests = join ' ', glob ($online_tests ? 't/0*.t t/m*.t' : 't/0*.t'); if($online_tests) { #my $person_test = ExtUtils::MakeMaker::prompt('Do you want to perform online tests for IMDB persons during "make test" phase?', 'no') =~ /^\s*(y)/i; #$tests .= ' ' . join ' ', glob 't/p*.t' if $person_test; my $extra_test = ExtUtils::MakeMaker::prompt('Do you want to perform extra online tests during "make test" phase?', 'no') =~ /^\s*(y)/i; $tests .= ' ' . join ' ', glob 't/n*.t' if $extra_test; my $pod_test = ExtUtils::MakeMaker::prompt('Do you want to perform POD checking during "make test" phase?', 'no') =~ /^\s*(y)/i; $tests .= ' ' . join ' ', glob 't/y*.t' if $pod_test; } WriteMakefile( NAME => 'IMDB::Film', VERSION_FROM => 'lib/IMDB/BaseClass.pm', PREREQ_PM => { 'HTML::TokeParser' => 2.28, 'LWP::Simple' => 1.41, 'Cache::FileCache' => 0, 'Carp' => 0, 'Error' => 0, 'Digest::SHA1' => 0, 'Pod::Checker' => 0, 'HTML::Entities' => 0, 'Text::Unidecode' => 0, }, test => {TESTS => $tests}, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/IMDB/Film.pm', AUTHOR => 'Michael Stepanov <stepanov.michael@gmail.com>') : ()), ); ��������������IMDB-Film-0.53/MANIFEST.SKIP������������������������������������������������������������������������0000644�0001750�0001750�00000000044�11730353345�014527� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.arch-ids {arch} blib/ .svn patches ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/Todo���������������������������������������������������������������������������������0000644�0001750�0001750�00000000624�11730353347�013467� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TODO list for Perl module IMDB::Film - Add possibility to indicate is it TV series or not (http://www.imdb.com/title/tt0367279/). - Add retrieving TV series episodes (http://www.imdb.com/title/tt0367279/episodes#season-1). - Add functionality to get additional information such as Full Cast and Crew, sound track etc. - Move all methods with needed additional connect to IMDB.com into separte module. ������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/META.yml�����������������������������������������������������������������������������0000664�0001750�0001750�00000001234�12071605164�014104� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������--- abstract: 'OO Perl interface to the movies database IMDB.' author: - 'Michael Stepanov <stepanov.michael@gmail.com>' build_requires: ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120630' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: IMDB-Film no_index: directory: - t - inc requires: Cache::FileCache: 0 Carp: 0 Digest::SHA1: 0 Error: 0 HTML::Entities: 0 HTML::TokeParser: 2.28 LWP::Simple: 1.41 Pod::Checker: 0 Text::Unidecode: 0 version: 0.53 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/t/�����������������������������������������������������������������������������������0000755�0001750�0001750�00000000000�12071605164�013074� 5����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/t/m6_get_movie_by_title_with_cr_casts.t����������������������������������������������0000644�0001750�0001750�00000000617�11730353344�022455� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Test retrieving list of cast in case of Credited cast. # use strict; use Test::More tests => 2; use IMDB::Film; my $crit = '0326272'; my %pars = (cache => 0, debug => 0, crit => $crit); my $obj = new IMDB::Film(%pars); is($obj->title, 'Three Sopranos', 'Movie title'); my $cast = $obj->cast; is_deeply($cast->[0], {id => '1202207', name => 'Kathleen Cassello', role => 'Herself'}, 'cast'); �����������������������������������������������������������������������������������������������������������������IMDB-Film-0.53/t/test_p.html������������������������������������������������������������������������0000644�0001750�0001750�00000610703�11730353345�015271� 0����������������������������������������������������������������������������������������������������ustar �michael�������������������������michael����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html class=" scriptsOn" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><head> <script type="text/javascript">var IMDbTimer={starttime: new Date().getTime()};</script> <title>IMDb - Tom Cruise
Tom Cruise Picture
STARmeter
66
Up 1 this week

Tom Cruise


If you had told 14 year old Franciscan seminary student Thomas Cruise Mapother IV that one day in the not too distant future he would be considered one of the top 100 movie stars of all time, he would have probably grinned and told you that his ambition was to become a priest. Nonetheless, this sensitive... See full bio »

Tom Cruise's Tweets

Stuntman Guide: Info, Skills, and Training to Become A Pro Stunt Performer! http://t.co/6pCmD39 #Aspiring2ActWriteDirect -Team TC
15 hours ago

Related Lists

image of
a list of 37 images by frumusicaiulya created 2 months ago
 
image of name
a list of 50 people by Meer Agha MuFc created 1 month ago
 
image of name
a list of 35 people by SonicStuart created 6 months ago
 
image of
a list of 35 images by qmanever created 2 weeks ago
 
image of name
a list of 45 people by srki9563 created 3 weeks ago
 

Do you have a demo reel?

Connect with IMDb


Nominated for 3 Oscars. Another 34 wins & 43 nominations See more awards »

Known For


Filmography

Hide HideActor (37 titles)
1986 Top Gun
Maverick
 
1985 Legend
Jack
 
1983 Losin' It
Woody
 
Show ShowProducer (15 titles)
2013/II One Shot (producer) (pre-production)
 
2006 Mission: Impossible III (producer)
 
2006 Ask the Dust (producer)
 
2005 Elizabethtown (producer)
 
2004 Suspect Zero (producer - uncredited)
 
2003 The Last Samurai (producer)
 
2003 Shattered Glass (executive producer)
 
2002 Hitting It Hard (video documentary short) (producer)
 
2002 Narc (executive producer)
 
2001 Vanilla Sky (producer)
 
2001 The Others (executive producer)
 
2000 Mission: Impossible II (producer)
 
1998 Without Limits (producer)
 
1996 Mission: Impossible (producer)
 
Show ShowSoundtrack (2 titles)
2009 The Jay Leno Show (TV series)
Episode #1.2 (2009) (performer: "Isn't She Lovely" - uncredited)
 
1986 Top Gun (performer: "You've Lost That Lovin' Feeling" - uncredited, "Great Balls of Fire" - uncredited)
 
Show ShowDirector (1 title)
1993 Fallen Angels (TV series)
 
Show ShowWriter (1 title)
1990 Days of Thunder (story)
 
Show ShowThanks (13 titles)
2008 Artists of the Roundtable (video documentary) (special thanks)
 
2008 The Brothers Bloom (thanks)
 
2008 Tropic Thunder: Rain of Madness (video short) (special thanks)
 
2006 Paris, Je T'Aime (thanks)
 
2005 Blown (video) (special thanks)
 
2004 My Karma (short) (the producers wish to thank)
 
2003 Narc: Shooting Up (video documentary short) (special thanks)
 
2002 AFI's 100 Years... 100 Passions: America's Greatest Love Stories (TV special documentary) (thanks)
 
2001 Code of Conduct (video documentary short) (special thanks)
 
1999 Cruise on Kubrick (video documentary short) (thanks)
 
1999 Kidman on Kubrick (video documentary short) (thanks)
 
1999 Spielberg on Kubrick (video documentary short) (thanks)
 
1988 'Rain Man' Featurette (TV documentary short) (special thanks)
 
Show ShowSelf (168 titles)
2010 VIP zprávy (TV series)
Himself
Episode #1.23 (2010) … Himself
Episode #1.21 (2010) … Himself
Episode #1.13 (2010) … Himself
 
2006-2010 Entertainment Tonight (TV series)
Himself
Episode dated 19 August 2010 (2010) … Himself
Episode dated 17 June 2010 (2010) … Himself
Episode dated 16 June 2010 (2010) … Himself
Episode dated 15 June 2010 (2010) … Himself
Episode dated 28 May 2010 (2010) … Himself
 
2010 Face 2 Face (TV series)
Himself
Tom Cruise/Cameron Diaz (2010) … Himself
 
2010 Top Gear (TV series)
Himself
Episode #15.5 (2010) … Himself
 
2010 Breakfast (TV series)
Himself - Actor
Episode dated 23 July 2010 (2010) … Himself - Actor
 
2010 The ONE Show (TV series)
Himself
Episode dated 22 July 2010 (2010) … Himself
 
2010 The 7PM Project (TV series)
Himself
Episode #1.252 (2010) … Himself
 
2001-2010 The Tonight Show with Jay Leno (TV series)
Himself
Episode #18.77 (2010) … Himself
Episode dated 11 December 2008 (2008) … Himself
Episode dated 30 October 2007 (2007) … Himself
Episode dated 11 May 2006 (2006) … Himself
Episode dated 8 June 2005 (2005) … Himself
 
2010 Caiga quien caiga (TV series)
Himself
Episode dated 20 June 2010 (2010) … Himself
 
1994-2010 Días de cine (TV series)
Himself
Episode dated 17 June 2010 (2010) … Himself
Episode dated 29 January 2009 (2009) … Himself
Episode dated 9 December 1994 (1994) … Himself
 
2010 2010 MTV Movie Awards (TV movie)
Himself - Presenter/Performer (Les Grossman)
 
2010 National Movie Awards (TV movie)
Himself
 
2003-2010 The Oprah Winfrey Show (TV series)
Himself
Episode dated 14 May 2010 (2010) … Himself
Tom Cruise's Greatest Hits (2008) … Himself
Episode dated 5 May 2008 (2008) … Himself
Episode dated 2 May 2008 (2008) … Himself
Episode dated 14 November 2005 (2005) … Himself
 
2010 Sex, Drugs & Religion (documentary)
Himself
 
2008-2009 Jimmy Kimmel Live! (TV series)
Himself / Himself - Birthday Greeting to Uncle Frank / Himself - Guest / …
Episode dated 11 November 2009 (2009) … Himself - Birthday Greeting to Uncle Frank
Episode #6.178 (2008) … Himself - Guest
Episode #6.176 (2008) … Himself - Interviewed by Guillermo
 
2009 Together: The Hendrick Motorsports Story (TV documentary)
Narrator (voice)
 
2008-2009 Access Hollywood (TV series)
Himself
Episode dated 1 October 2009 (2009) … Himself
Episode dated 9 December 2008 (2008) … Himself (also archive footage)
 
2009 The Jay Leno Show (TV series)
Himself
Episode #1.2 (2009) … Himself
 
2009 Storymakers (TV series)
Himself
Episode #1.2 (2009) … Himself
 
2005-2009 Smap×Smap (TV series)
Himself / Himself - Guest
Episode dated 16 March 2009 (2009) … Himself - Guest (as Tomu Kurûzu)
Episode dated 27 June 2005 (2005) … Himself
 
2009 Fantástico (TV series documentary)
Himself
Episode dated 8 February 2009 (2009) … Himself
Episode dated 1 February 2009 (2009) … Himself
 
2009 Quelli che... il calcio (TV series)
Himself
Episode #16.19 (2009) … Himself
 
2009 Cinema 3 (TV series)
Himself
Episode dated 31 January 2009 (2009) … Himself
 
1996-2009 Nyhetsmorgon (TV series)
Himself
Episode #35.29 (2009) … Himself
Filmen 'Collateral' (2004) … Himself
Filmen 'Minority Report' (2002) … Himself
Om filmen 'Jerry Maguire' (1997) … Himself
 
2006-2009 Wetten, dass..? (TV series)
Himself
Wetten, dass..? aus Offenburg (2009) … Himself
 
2009 Friday Night with Jonathan Ross (TV series)
Himself
Episode #16.1 (2009) … Himself
 
2009 The 66th Annual Golden Globe Awards (TV movie)
Himself - Nominee: Best Actor in a Supporting Role in a Motion Picture & Presenter: Best Motion Picture - Drama
 
2005-2009 The View (TV series)
Himself
Episode dated 9 January 2009 (2009) … Himself
Episode dated 1 July 2005 (2005) … Himself
 
2009 2009 Golden Globe Awards Red Carpet Special (TV movie)
Himself
 
2004-2008 Live with Regis and Kelly (TV series)
Himself
Episode dated 17 December 2008 (2008) … Himself
Episode dated 5 August 2004 (2004) … Himself
 
2004-2008 Late Show with David Letterman (TV series)
Himself / Himself - Guest
Episode #16.60 (2008) … Himself - Guest
Episode dated 1 June 2006 (2006) … Himself
Episode dated 2 May 2006 (2006) … Himself
Episode dated 23 June 2005 (2005) … Himself
Episode dated 4 August 2004 (2004) … Himself
 
2005-2008 Today (TV series)
Himself
Episode dated 15 December 2008 (2008) … Himself
Episode dated 27 June 2005 (2005) … Himself
 
2008 Tellement People (TV series)
Himself
Episode #1.8 (2008) … Himself
 
2008 2008 MTV Movie Awards (TV special)
Himself
 
2007 Bambi Verleihung 2007 (TV movie)
Himself
 
2007 Don't Tell My Booker!!! (documentary)
Himself
 
2007 Lions for Lambs: World Premiere Special (TV documentary)
Himself
 
2007 Exclusiv - Das Star-Magazin (TV series)
Himself
Episode dated 20 June 2007 (2007) … Himself
 
2007 The 79th Annual Academy Awards (TV special)
Himself - Presenter: The Jean Hersholt Humanitarian Award
 
2007 InStyle: Celebrity Weddings (TV movie)
Himself
 
2007 Golden Age of Knowledge for Eternity (video documentary)
Himself - audience member, front row (uncredited)
 
2006 Inside Edition (TV series documentary)
Himself
Episode dated 7 December 2006 (2006) … Himself
 
2006 Inside the IMF (video documentary short)
 
2006 Visualizing the Mission (video documentary short)
 
2006 Scoring the Mission (video documentary short)
 
2006 Mission: Metamorphosis (video documentary short)
 
2006 The Making of the Mission (video documentary short)
Himself
 
2006 Mission Action: Inside the Action Unit (video short)
Himself
 
2006 Bl!tz (TV series documentary)
Himself
Episode dated 8 October 2006 (2006) … Himself
 
2006 Forbes Celebrity 100: Who Made Bank? (TV movie)
Himself
 
2006 Howard Stern on Demand (TV series)
Himself
Guessing Game (2006) … Himself (uncredited)
 
2006 Legends Ball (TV documentary)
Himself
 
2006 Ellen: The Ellen DeGeneres Show (TV series)
Himself
Episode dated 12 May 2006 (2006) … Himself
Episode dated 12 January 2006 (2006) … Himself
 
2006 HypaSpace (TV series documentary)
Himself
Episode #5.90 (2006) … Himself
Episode #5.57 (2006) … Himself
 
2006 Diary (TV series documentary)
Himself
Diary of Tom Cruise and Sway (2006) … Himself
 
2003-2006 Total Request Live (TV series)
Himself
Episode dated 3 May 2006 (2006) … Himself
Episode dated 24 June 2005 (2005) … Himself
Episode dated 5 August 2004 (2004) … Himself
Episode dated 2 December 2003 (2003) … Himself
 
2006 1 Leicester Square (TV series)
Himself
Episode #1.5 (2006) … Himself
 
2006 Catering Impossible: M:i:III (TV movie)
Himself
 
2006 TRL Italy (TV series)
Himself
Episode #8.1 (2006) … Himself
 
2005 Corazón de... (TV series)
Himself
Episode dated 1 December 2005 (2005) … Himself
Episode dated 11 November 2005 (2005) … Himself
Episode dated 14 July 2005 (2005) … Himself
 
2005 'War of the Worlds': Production Diaries, East Coast - Exile (video documentary short)
Himself
 
2005 'War of the Worlds': Production Diaries, East Coast - Beginning (video documentary short)
Himself
 
2005 'War of the Worlds': Revisiting the Invasion (video short)
Himself
 
2005 Designing the Enemy: Tripods and Aliens (video short)
Himself
 
2005 'War of the Worlds': Production Diaries, West Coast - Destruction (video documentary short)
Himself
 
2005 'War of the Worlds': Production Diaries, West Coast - War (video documentary short)
Himself
 
2005 We Are Not Alone (video short)
Himself
 
2005 Magacine (TV series)
Himself
Episode dated 1 July 2005 (2005) … Himself
 
2005 Rove Live (TV series)
Himself
Episode #6.21 (2005) … Himself
 
2005 BET Awards 2005 (TV special)
Himself
 
2005 War of the Worlds: UK Premiere Special (TV documentary)
Himself
 
2003-2005 HBO First Look (TV series documentary)
Himself / 'Vincent'
War of the Worlds: The Final Invasion (2005) … Himself
Collateral (2004) … Himself/'Vincent'
The Last Samurai: An Epic Journey (2003) … Himself
 
2005 2005 MTV Movie Awards (TV special)
Himself
 
2005 The 10th Annual Critics' Choice Awards (TV documentary)
Himself
 
2004 Danger Zone: The Making of 'Top Gun' (video documentary)
Himself (also archive footage)
 
2004 City of Night: The Making of 'Collateral' (video documentary short)
Himself
 
2003-2004 Larry King Live (TV series)
Himself
Episode dated 19 November 2004 (2004) … Himself
Episode dated 28 November 2003 (2003) … Himself
 
2004 Genius: A Night for Ray Charles (TV special)
Himself
 
2004 Parkinson (TV series)
Himself
Episode dated 4 September 2004 (2004) … Himself
 
2004 E! Entertainment Special: Tom Cruise (TV documentary)
Himself
 
2004 The Daily Show with Jon Stewart (TV series)
Himself
Episode dated 11 August 2004 (2004) … Himself
 
2004 Primetime Wednesday (TV series documentary)
Himself
Episode dated 9 August 2004 (2004) … Himself
 
2004 ESPY Awards (TV special)
Himself
 
2004 2004 MTV Movie Awards (TV special)
Himself
 
2004 MTV Movie Awards 2004 Pre-Show (TV special)
Himself
 
2004 4Pop (TV series documentary)
Himself
Pääsiäisen leffaspesiaali (2004) … Himself
 
2004 The 76th Annual Academy Awards (TV special)
Himself - Presenter: Best Director
 
2004 The 2004 IFP/West Independent Spirit Awards (TV documentary)
Himself
 
2004 The 61st Annual Golden Globe Awards (TV special)
Himself - Nominee: Best Actor in a Motion Picture - Drama
 
2004 Inside the Actors Studio (TV series)
Himself
Episode #10.7 (2004) … Himself
 
2003 Nobel Peace Prize Concert (TV special documentary)
Host
 
2003 The Early Show (TV series)
Himself
Episode dated 3 December 2003 (2003) … Himself
 
2003 XMA: Xtreme Martial Arts (TV documentary)
Interviewee
 
2003 Dateline NBC (TV series documentary)
Himself
Episode dated 14 November 2003 (2003) … Himself
 
2003 History vs. Hollywood (TV series documentary)
Himself
The Last Samurai (2003) … Himself
 
2003 Tinseltown TV (TV series)
Himself
Episode dated 30 August 2003 (2003) … Himself
 
2003 Narc: Shooting Up (video documentary short)
Himself - Executive Producer
 
2003 2003 ABC World Stunt Awards (TV special)
Himself (uncredited)
 
2003 Kela on the Karpet (TV mini-series)
Himself
 
2002 'Minority Report': The Players (video documentary short)
Himself
 
2002 The World of 'Minority Report': An Introduction (video documentary short)
Himself
 
2002 ILM and 'Minority Report' (video documentary short)
Himself
 
2002 Deconstructing Precog Visions (video documentary short)
Himself
 
2002 Final Report (video short)
Himself
 
2002 'Minority Report': The Story, the Debate (video documentary short)
Himself
 
2002 The 54th Annual Primetime Emmy Awards (TV special)
Himself
 
2002 VH-1 Behind the Movie (TV series documentary)
Himself
Risky Business (2002) … Himself
 
2002 The Art of Action: Martial Arts in Motion Picture (TV documentary)
Himself
 
2002 Extra (TV series)
Himself
Episode dated 28 June 2002 (2002) … Himself (uncredited)
 
2002 Rank (TV series documentary)
Himself
25 Sexiest Movie Moments (2002) … Himself
25 Toughest Stars (2002) … Himself
 
1996-2002 The Rosie O'Donnell Show (TV series)
Himself
Episode dated 22 May 2002 (2002) … Himself
Episode dated 12 December 2001 (2001) … Himself
Episode dated 22 May 2000 (2000) … Himself
Episode dated 18 February 1998 (1998) … Himself
Episode dated 10 December 1996 (1996) … Himself
 
2002 Prelude to a Dream (video documentary short)
Himself
 
2002 Hitting It Hard (video documentary short)
Himself
 
2002 Space Station 3D (documentary)
Narrator (voice)
 
2002 The 74th Annual Academy Awards (TV special)
Himself
 
2002 + de cinéma (TV series documentary short)
Himself
Episode dated 20 March 2002 (2002) … Himself
 
2002 Road to the Red Carpet (TV movie)
Himself
 
2002 Exclusif (TV series)
Himself
Episode dated 30 January 2002 (2002) … Himself
 
2001 The Ray Martin Show (TV series)
Himself
Episode #1.10 (2001) … Himself
 
2001 America: A Tribute to Heroes (TV special documentary)
Himself
 
2001 2001 MTV Movie Awards (TV special)
Himself
 
2001 Young Hollywood Awards (TV special)
Himself
 
2001 The 73rd Annual Academy Awards (TV special)
Himself - Presenter: Best Director
 
2001 Stanley Kubrick: A Life in Pictures (documentary)
Himself (Narrator) (voice)
 
2001 The 58th Annual Golden Globe Awards (TV movie)
Himself - Presenter: Best Actress in a Supporting Role in a Motion Picture
 
2001 Code of Conduct (video documentary short)
Himself
 
2001 A Look Inside: The Others (TV documentary short)
Himself
 
2000 Behind the Mission: The Making of 'M:I-2' (video documentary short)
Himself
 
2000 2000 MTV Movie Awards (TV special documentary)
Himself
 
2000 2000 Blockbuster Entertainment Awards (TV special documentary)
Himself
 
2000 The 72nd Annual Academy Awards (TV special)
Himself - Nominee: Best Actor in a Supporting Role
 
2000 Mission: Improbable (TV short)
Himself
 
2000 The Directors (TV series documentary)
Himself
The Films of Oliver Stone (2000) … Himself
 
2000 The 57th Annual Golden Globe Awards (TV movie)
Himself - Winner: Best Actor in a Supporting Role in a Motion Picture
 
1999 AFI Life Achievement Award: A Tribute to Dustin Hoffman (TV special documentary)
Himself
 
1999 Intimate Portrait (TV series documentary)
Himself
Melissa Etheridge (1999) … Himself
 
1999 Cruise on Kubrick (video documentary short)
Himself
 
1998 Investigative Reports (TV series)
Himself
Inside Scientology (1998) … Himself
 
1998 Junket Whore (documentary)
Himself
 
1998 Bravo Profiles: The Entertainment Business (TV mini-series documentary)
Himself
 
1997 The Magic School Bus (TV series)
Himself
Goes Cell-ular (1997) … Himself (voice)
 
1997 The GQ Men of the Year Awards (TV special)
Himself
 
1997 The 69th Annual Academy Awards (TV special)
Himself - Nominee: Best Actor in a Leading Role
 
1997 Mundo VIP (TV series)
Himself
Show nº 46 (1997) … Himself
 
1997 The 54th Annual Golden Globe Awards (TV movie)
Himself - Winner: Best Actor in a Motion Picture - Comedy/Musical & Presenter: Cecil B. DeMille Award
 
1996 The 53rd Annual Golden Globe Awards (TV movie)
Himself - Audience Member
 
1994 The 66th Annual Academy Awards (TV special)
Himself - Presenter: Hersholt Award to Paul Newman
 
1993 CBS This Morning (TV series)
Himself
Episode dated 25 June 1993 (1993) … Himself
 
1993 The 50th Annual Golden Globe Awards (TV movie)
Himself - Nominee: Best Actor in a Motion Picture Drama
 
1993 Rock the Vote (TV movie)
Himself
 
1992 The 49th Annual Golden Globe Awards (TV movie)
Himself
 
1992 Time Out: The Truth About HIV, AIDS, and You (video short)
Himself
 
1991 MTV's 10th Anniversary Special (TV movie)
Himself
 
1991 AFI Life Achievement Award: A Tribute to Kirk Douglas (TV special documentary)
Himself
 
1991 The 63rd Annual Academy Awards (TV special)
Himself - Presenter: Best Director
 
1990 The Tonight Show Starring Johnny Carson (TV series)
Himself
Episode dated 5 July 1990 (1990) … Himself
 
1990 The 62nd Annual Academy Awards (TV special)
Himself - Nominee: Best Actor in a Leading Role
 
1990 The 47th Annual Golden Globe Awards (TV special)
Himself - Winner: Best Actor in a Motion Picture - Drama
 
1989 The 61st Annual Academy Awards (TV special)
Himself
 
1988 Late Night with David Letterman (TV series)
Himself
Episode dated 10 August 1988 (1988) … Himself
 
1988 'Rain Man' Featurette (TV documentary short)
Himself
 
1984 Northwest Afternoon (TV series)
Himself
 
Show ShowArchive Footage (69 titles)
2011 Late Night with Jimmy Fallon (TV series)
 
2010 Industrial Light & Magic: Creating the Impossible (TV documentary)
Narrator
 
2010 Panorama (TV series documentary)
 
2005-2010 Entertainment Tonight (TV series)
 
2010 Top Gear (TV series)
 
2010 The Tonight Show with Jay Leno (TV series)
 
2010 Breakfast (TV series)
 
2010 Live from Studio Five (TV series)
 
2009 The Oprah Winfrey Show (TV series)
 
2009 Eiga no tatsujin 2: End Credits (TV series)
 
2007-2009 20 to 1 (TV series documentary)
 
2008 Plácido y la copla (TV movie)
Himself
 
2008 Jimmy Kimmel Live! (TV series)
 
2008 Premio Donostia a Meryl Streep (TV movie)
Senator Jasper Irving
 
2008 Religulous (documentary)
Himself (uncredited)
 
2008 Strictly Courtroom (TV documentary)
Lt. Daniel Kaffee (uncredited)
 
2008 Mornings with Kerri-Anne (TV series)
 
2008 5 Second Movies (TV series short)
 
2008 A Current Affair (TV series)
 
2008 Oscar, que empiece el espectáculo (TV documentary)
Charlie Babbitt/Frank T.J. Mackey (uncredited)
 
2008 August
Himself (uncredited)
 
2006-2008 The O'Reilly Factor (TV series)
 
2008 Irak-Afganistán, la guerra llega al cine (TV documentary)
Himself
 
2007 Forbes 20 Under 25: Young, Rich and Famous (TV movie)
Himself (uncredited)
 
2007 Red Eye (TV series)
 
2007 The Spirit of Money (documentary)
Himself (uncredited)
 
2007 Rome Is Burning (TV series)
 
2007 Cómo conseguir un papel en Hollywood (TV documentary)
Himself/David Aames
 
2007 Amor mío (TV series)
 
2006 106 & Park Top 10 Live (TV series)
 
2006 The Most Annoying People of 2006 (TV documentary)
Himself
 
2006 Overrated in '06 (TV movie)
Himself
 
2006 Access Hollywood (TV series)
 
2006 La imagen de tu vida (TV series)
 
2006 Premio Donostia a Max Von Sydow (TV movie)
Chief John Anderton (uncredited)
 
2006 The Queen
Himself (uncredited)
 
2006 Boffo! Tinseltown's Bombs and Blockbusters (documentary)
Himself/Ethan Hunt/Ray Ferrier (uncredited)
 
2006 Getaway (TV series)
 
2006 CMT Insider (TV series)
 
2006 100 Greatest Teen Stars
Himself
 
2005-2006 Corazón de... (TV series)
 
2005 E! True Hollywood Story (TV series documentary)
 
2005 Magacine (TV series)
 
2005 80s (TV series documentary)
 
2005 Cinema mil (TV series)
 
2005 Biography (TV series documentary)
 
2005 Buenafuente (TV series)
 
2005 I Love the '90s: Part Deux (TV series documentary)
 
2004 Retrosexual: The 80's (TV mini-series documentary)
Himself
 
2003-2004 Celebrities Uncensored (TV series)
 
2004 This Is Scientology: An Overview of the World's Fastest Growing Religion (video documentary)
Man at H.E.L.P. Hollywood (uncredited)
 
2003 Sex at 24 Frames Per Second (video documentary)
Himself
 
2003 101 Most Shocking Moments in Entertainment (TV documentary)
Himself
 
2003 200 Greatest Pop Culture Icons (TV mini-series documentary)
Himself
 
2003 Love Chain (TV series)
 
2002 Intimate Portrait (TV series documentary)
 
2002 Shirtless: Hollywood's Sexiest Men (TV documentary)
Himself (uncredited)
 
2002 El informal (TV series)
 
2002 Who Is Alan Smithee? (TV documentary)
Himself (uncredited)
 
2001 A Few Good Men: From Stage to Screen (video documentary short)
Lt. Daniel Kaffee (uncredited)
 
2000 Twentieth Century Fox: The Blockbuster Years (TV documentary)
Cadet Captain David Shawn
 
1998 Warner Bros. 75th Anniversary: No Guts, No Glory (TV documentary)
(uncredited)
 
1995 The Movie Show (TV series)
 
1993 The 65th Annual Academy Awards (TV special)
Lt. Daniel Kaffee (uncredited)
 
1987 The 59th Annual Academy Awards (TV special)
Jack/Maverick/Vincent Lauria (uncredited)
 

Related Videos

Valkyrie -- Clip: First five minutes of the film Knight and Day -- Interview: Tom Cruise "On June Haven's dilemma trusting his character Roy Miller" ISP: Feminine Mistake -- On today's show: A gender bending lawsuit in NYC; Tom Cruise and the alien invasion; and the home mortgage meltdown.
Edit

Personal Details

Other Works:

Is interviewed on the DVD for the film Narc, on which he served as an executive producer. See more »

Publicity Listings:

12 Print Biographies  | 30 Interviews  | 106 Articles  | 142 Magazine Cover Photos  | See more »

Official Sites:

Official Site | See more »

Alternate Names:

Tomu Kurûzu

Height:

5' 7" (1.70 m)
Edit

Did You Know?

Personal Quote:

[on the relationship with Katie Holmes, about other people thinking it's a publicity stunt] It's amusing at first. It's funny. But then you sit back and realize how sad it is that there are people who can't even imagine feeling like this. But my friends are happy for me. The people who know me are happy. My mom is happy. My family is happy. See more »

Trivia:

He and his former girlfriend Penélope Cruz appeared together in Vanilla Sky See more »

Trademark:

Often plays romantic leading men with an edge. See more »

Star Sign:

Cancer

Message Boards

Search the message boards

Only search Tom Cruise
Discuss Tom Cruise on the IMDb message boards »

Contribute to This Page


Explore More About Tom Cruise


IMDB-Film-0.53/t/p4_get_person_info_offline.t0000644000175000017500000000201611730353344020546 0ustar michaelmichaeluse Test::More tests => 5; use IMDB::Persons; my %person_info = ( code => '0000129', id => '0000129', name => qq{Tom Cruise}, mini_bio => qq{If you had told 14 year old Franciscan seminary student Thomas Cruise Mapother IV that one day in the not too distant future he would be considered one of the top 100 movie stars of all time, he would have probably grinned and told you that his ambition was to become a priest. Nonetheless, this sensitive...}, date_of_birth => qq{3 July 1962}, place_of_birth => qq{Syracuse, New York, USA}, photo => '38m.jpg', ); my %pars = (crit => 't/test_p.html', cache => 0, debug => 0); my $p = new IMDB::Persons(%pars); # FIXME #is($p->code, $person_info{code}, 'code'); is($p->name, $person_info{name}, 'name'); is($p->date_of_birth, $person_info{date_of_birth}, 'date_of_birth'); is($p->place_of_birth, $person_info{place_of_birth}, 'place_of_birth'); is($p->mini_bio, $person_info{mini_bio}, 'mini_bio'); like($p->photo, qr#\.jpg#i, 'photo'); IMDB-Film-0.53/t/m1_get_movie_by_code.t0000644000175000017500000001165612071062513017324 0ustar michaelmichaeluse strict; use warnings; use Test::More tests => 21; use IMDB::Film; my $crit = '0332452'; my %films = ( code => '0332452', id => '0332452', title => 'Troy', year => '2004', genres => [qw(Adventure Action Drama War Romance)], country => [qw(Malta UK USA)], language => [qw(English)], company => 'Warner Bros. Pictures', duration => '163 min', plot => qq{An adaptation of Homer's great epic, the film follows the assault on Troy by the united Greek forces and chronicles the fates of the men involved.}, storyline => qq{It is the year 1250 B.C. during the late Bronze age. Two emerging nations begin to clash after Paris, the Trojan prince, convinces Helen, Queen of Sparta, to leave her husband, Menelaus, and sail with him back to Troy. After Menelaus finds out that his wife was taken by the Trojans, he asks his brother Agamemnon to help him get her back. Agamemnon sees this as an opportunity for power. So they set off with 1,000 ships holding 50,000 Greeks to Troy. With the help of Achilles, the Greeks are able to fight the never before defeated Trojans. But they come to a stop by Hector, Prince of Troy. The whole movie shows their battle struggles and the foreshadowing of fate in this remake by Wolfgang Petersen of Homer's "The Iliad."}, full_plot => qq{It is the year 1250 B.C. during the late Bronze age. Two emerging nations begin to clash after Paris, the Trojan prince, convinces Helen, Queen of Sparta, to leave her husband, Menelaus, and sail with him back to Troy. After Menelaus finds out that his wife was taken by the Trojans, he asks his brother Agamemnon to help him get her back. Agamemnon sees this as an opportunity for power. So they set off with 1,000 ships holding 50,000 Greeks to Troy. With the help of Achilles, the Greeks are able to fight the never before defeated Trojans. But they come to a stop by Hector, Prince of Troy. The whole movie shows their battle struggles and the foreshadowing of fate in this remake by Wolfgang Petersen of Homer's "The Iliad."}, cover => qq{MV5BMTU1MjM4NTA5Nl5BMl5BanBnXkFtZTcwOTE3NzA1MQ@@._V1._SX100_SY114_.jpg}, cast => [{ id => '0002103', name => 'Julian Glover', role => 'Triopas'}, { id => '0004051', name => 'Brian Cox', role => 'Agamemnon'}, { id => '0428923', name => 'Nathan Jones', role => 'Boagrius'}, { id => '0549538', name => 'Adoni Maropis', role => 'Agamemnon\'s Officer'}, { id => '0808559', name => 'Jacob Smith', role => 'Messenger Boy'}, { id => '0000093', name => 'Brad Pitt', role => 'Achilles'}, { id => '0795344', name => 'John Shrapnel', role => 'Nestor'}, { id => '0322407', name => 'Brendan Gleeson', role => 'Menelaus'}, { id => '1208167', name => 'Diane Kruger', role => 'Helen'}, { id => '0051509', name => 'Eric Bana', role => 'Hector'}, { id => '0089217', name => 'Orlando Bloom', role => 'Paris'}, { id => '1595495', name => 'Siri Svegler', role => 'Polydora'}, { id => '1595480', name => 'Lucie Barat', role => 'Helen\'s Handmaiden'}, { id => '0094297', name => 'Ken Bones', role => 'Hippasus'}, { id => '0146439', name => 'Manuel Cauchi', role => 'Old Spartan Fisherman'}, ], directors => [{id => '0000583', name => 'Wolfgang Petersen'}], writers => [{id => '0392955', name => 'Homer'}, {id => '1125275', name => 'David Benioff'}], mpaa_info => 'Rated R for graphic violence and some sexuality/nudity', ); my %pars = (cache => 0, debug => 0, crit => $crit); my $obj = new IMDB::Film(%pars); isa_ok($obj, 'IMDB::Film'); my @countries = sort(@{$obj->country}); my @genres = sort(@{$obj->genres}); is($obj->code, $films{code}, 'Movie IMDB Code'); is($obj->id, $films{id}, 'Movie IMDB ID'); is($obj->title, $films{title}, 'Movie Title'); is($obj->year, $films{year}, 'Movie Production Year'); like($obj->plot, qr/$films{plot}/, 'Movie Plot'); like($obj->storyline, qr/$films{storyline}/, 'Movie Storyline'); like($obj->cover, '/\.jpg/i', 'Movie Cover'); is_deeply($obj->cast, $films{cast}, 'Movie Cast'); is($obj->language->[0], $films{language}[0], 'Movie Language'); is($countries[0], $films{country}[0], 'Movie Country'); is($genres[0], $films{genres}[0], 'Movie Genre'); like($obj->full_plot, qr/$films{full_plot}/, 'Movie full plot'); is($obj->duration, $films{duration}, 'Movie Duration'); is($obj->mpaa_info, $films{mpaa_info}, 'MPAA'); is($obj->company, $films{company}, 'Company'); my($rate, $num) = $obj->rating(); like($rate, qr/\d+/, 'Movie rating'); like($num, qr/\d+/, 'Rated people'); $rate = $obj->rating; like($rate, qr/\d+/, 'Movie rating'); #my $certs = $obj->certifications; #is($certs->{USA}, 'R', 'Movie Certifications'); is_deeply($obj->directors, $films{directors}, 'Movie Directors'); is_deeply($obj->writers, $films{writers}, 'Movie Writers'); #my $rec_movies = $obj->recommendation_movies(); #my($code, $title) = each %$rec_movies; #like($code, qr/\d+/, 'Recommedation movies'); IMDB-Film-0.53/t/01_base.t0000644000175000017500000000020511730353344014471 0ustar michaelmichael# # Base test for IMDB::Film # use strict; use warnings; use Test::More tests => 2; use_ok('IMDB::Film'); use_ok('IMDB::Persons'); IMDB-Film-0.53/t/m5_get_movie_by_title_without_rate.t0000644000175000017500000000041012071066076022327 0ustar michaelmichaeluse strict; use Test::More tests => 2; use IMDB::Film; my $crit = 'Jonny Zero'; my %pars = (cache => 0, debug => 0, crit => $crit); my $obj = new IMDB::Film(%pars); is($obj->code, '0412158', 'Movies IMDB Code'); is($obj->rating, $obj->rating, 'Movie Rating'); IMDB-Film-0.53/t/m4_get_movie_by_title_single_match.t0000644000175000017500000000042212071066766022256 0ustar michaelmichaeluse strict; use Test::More tests => 2; use IMDB::Film; my $crit = 'Con Air'; my %pars = (cache => 0, debug => 0, crit => $crit, exact => 1); my $obj = new IMDB::Film(%pars); is($obj->code, '0118880', 'search code'); is(scalar(@{$obj->matched}), 5, 'Matched results'); IMDB-Film-0.53/t/m3_get_movie_by_wrong_title.t0000644000175000017500000000042011730353345020743 0ustar michaelmichaeluse strict; use Test::More tests => 3; use IMDB::Film; my $crit = 'hhhhhhhhhhh'; my %pars = (cache => 0, debug => 0, crit => $crit); my $obj = new IMDB::Film(%pars); is($obj->error, 'Not Found', 'error'); is($obj->status, 0, 'status'); is($obj->code, undef, 'code'); IMDB-Film-0.53/t/m2_get_movie_by_title.t0000644000175000017500000001115712071062531017530 0ustar michaelmichaeluse strict; use warnings; use Test::More tests => 19; use IMDB::Film; my $crit = 'Troy'; my %films = ( code => '0332452', id => '0332452', title => 'Troy', year => '2004', genres => [qw(Adventure Action Drama War Romance)], country => [qw(Malta UK USA)], language => [qw(English)], company => 'Warner Bros. Pictures', plot => qq{An adaptation of Homer's great epic, the film follows the assault on Troy by the united Greek forces and chronicles the fates of the men involved.}, storyline => qq{It is the year 1250 B.C. during the late Bronze age. Two emerging nations begin to clash after Paris, the Trojan prince, convinces Helen, Queen of Sparta, to leave her husband, Menelaus, and sail with him back to Troy. After Menelaus finds out that his wife was taken by the Trojans, he asks his brother Agamemnon to help him get her back. Agamemnon sees this as an opportunity for power. So they set off with 1,000 ships holding 50,000 Greeks to Troy. With the help of Achilles, the Greeks are able to fight the never before defeated Trojans. But they come to a stop by Hector, Prince of Troy. The whole movie shows their battle struggles and the foreshadowing of fate in this remake by Wolfgang Petersen of Homer's "The Iliad."}, full_plot => qq{It is the year 1250 B.C. during the late Bronze age. Two emerging nations begin to clash after Paris, the Trojan prince, convinces Helen, Queen of Sparta, to leave her husband, Menelaus, and sail with him back to Troy. After Menelaus finds out that his wife was taken by the Trojans, he asks his brother Agamemnon to help him get her back. Agamemnon sees this as an opportunity for power. So they set off with 1,000 ships holding 50,000 Greeks to Troy. With the help of Achilles, the Greeks are able to fight the never before defeated Trojans. But they come to a stop by Hector, Prince of Troy. The whole movie shows their battle struggles and the foreshadowing of fate in this remake by Wolfgang Petersen of Homer's "The Iliad."}, cover => qq{MV5BMTU1MjM4NTA5Nl5BMl5BanBnXkFtZTcwOTE3NzA1MQ@@._V1._SX100_SY114_.jpg}, cast => [{ id => '0002103', name => 'Julian Glover', role => 'Triopas'}, { id => '0004051', name => 'Brian Cox', role => 'Agamemnon'}, { id => '0428923', name => 'Nathan Jones', role => 'Boagrius'}, { id => '0549538', name => 'Adoni Maropis', role => 'Agamemnon\'s Officer'}, { id => '0808559', name => 'Jacob Smith', role => 'Messenger Boy'}, { id => '0000093', name => 'Brad Pitt', role => 'Achilles'}, { id => '0795344', name => 'John Shrapnel', role => 'Nestor'}, { id => '0322407', name => 'Brendan Gleeson', role => 'Menelaus'}, { id => '1208167', name => 'Diane Kruger', role => 'Helen'}, { id => '0051509', name => 'Eric Bana', role => 'Hector'}, { id => '0089217', name => 'Orlando Bloom', role => 'Paris'}, { id => '1595495', name => 'Siri Svegler', role => 'Polydora'}, { id => '1595480', name => 'Lucie Barat', role => 'Helen\'s Handmaiden'}, { id => '0094297', name => 'Ken Bones', role => 'Hippasus'}, { id => '0146439', name => 'Manuel Cauchi', role => 'Old Spartan Fisherman'}, ], directors => [{id => '0000583', name => 'Wolfgang Petersen'}], writers => [{id => '0392955', name => 'Homer'}, {id => '1125275', name => 'David Benioff'}], duration => '163 min', aspect_ratio => '2.35 : 1', rating => '6.9', votes => '98918', ); my %pars = (cache => 0, debug => 0, crit => $crit); my $obj = new IMDB::Film(%pars); isa_ok($obj, 'IMDB::Film'); my @countries = sort(@{$obj->country}); my @genres = sort(@{$obj->genres}); is($obj->code, $films{code}, 'Movie IMDB Code'); is($obj->id, $films{id}, 'Movie IMDB ID'); is($obj->title, $films{title}, 'Movie Title'); is($obj->year, $films{year}, 'Movie Production Year'); like($obj->plot, qr/$films{plot}/, 'Movie Plot'); like($obj->storyline, qr/$films{storyline}/, 'Movie Storyline'); like($obj->cover, '/\.jpg/i', 'Movie Cover'); is_deeply($obj->cast, $films{cast}, 'Movie Cast'); is($obj->language->[0], $films{language}[0], 'Movie Language'); is($countries[0], $films{country}[0], 'Movie Country'); is($genres[0], $films{genres}[0], 'Movie Genre'); like($obj->full_plot, qr/$films{full_plot}/, 'Movie full plot'); is($obj->duration, $films{duration}, 'Movie Duration'); is($obj->aspect_ratio, $films{aspect_ratio}, 'Movie Aspect Ratio'); is($obj->company, $films{company}, 'Company'); my($rating, $votes) = $obj->rating(); cmp_ok($rating, '>=', $films{rating}, 'Rating'); cmp_ok($votes, '>=', $films{votes}, 'Votes'); cmp_ok($obj->rating(), '>=', $films{rating}, 'Rating'); IMDB-Film-0.53/t/p2_get_person_by_code.t0000644000175000017500000000175211730353344017521 0ustar michaelmichaeluse Test::More tests => 6; use IMDB::Persons; my %person_info = ( code => '0000129', id => '0000129', name => qq{Tom Cruise}, mini_bio => qq{If you had told 14 year old Franciscan seminary student Thomas Cruise Mapother IV that one day in the not too distant future he would be considered one of the top 100 movie stars of all time, he would have probably grinned and told you that his ambition was to become a priest. Nonetheless, this sensitive...}, date_of_birth => qq{3 July 1962}, place_of_birth => qq{Syracuse, New York, USA}, ); my %pars = (crit => $person_info{code}, cache => 0, debug => 0); my $p = new IMDB::Persons(%pars); is($p->code, $person_info{code}, 'code'); is($p->name, $person_info{name}, 'name'); is($p->date_of_birth, $person_info{date_of_birth}, 'date_of_birth'); is($p->place_of_birth, $person_info{place_of_birth}, 'place_of_birth'); is($p->mini_bio, $person_info{mini_bio}, 'mini_bio'); like($p->photo, qr#\.jpg#i, 'photo'); IMDB-Film-0.53/t/p1_get_person_by_name.t0000644000175000017500000000346111730353345017526 0ustar michaelmichaeluse Test::More tests => 6; use IMDB::Persons; use Data::Dumper; my %person_info = ( code => '0000129', id => '0000129', name => qq{Tom Cruise}, mini_bio => qq{If you had told 14 year old Franciscan seminary student Thomas Cruise Mapother IV that one day in the not too distant future he would be considered one of the top 100 movie stars of all time, he would have probably grinned and told you that his ambition was to become a priest. Nonetheless, this sensitive...}, date_of_birth => qq{3 July 1962}, place_of_birth => qq{Syracuse, New York, USA}, photo => '/images/M/MV5BMTI4MzUyMTI1N15BMl5BanBnXkFtZTcwOTg3NTYyMQ@@._V1._SX100_SY140_.jpg', film => { 'title' => 'Mission: Impossible III', 'role' => 'Ethan Hunt', 'year' => '2006', 'code' => '0317919' }, genres => ['Documentary', 'News', 'Talk-Show', 'Comedy'], plot_keywords => ['Number In Title', 'TV Special', 'Awards Show', 'Non Fiction'], ); my %pars = (crit => $person_info{name}, cache => 0, debug => 0); my $p = new IMDB::Persons(%pars); is($p->code, $person_info{code}, 'code'); is($p->name, $person_info{name}, 'name'); is($p->date_of_birth, $person_info{date_of_birth}, 'date_of_birth'); is($p->place_of_birth, $person_info{place_of_birth}, 'place_of_birth'); is($p->mini_bio, $person_info{mini_bio}, 'mini_bio'); like($p->photo, qr#\.jpg#i, 'photo'); # FIXME: Temporary disabled #my $list = $p->filmography(); #my $f = 0; #for my $movie(@{$list->{'Actor'}}) { # if($movie->{title} eq $person_info{film}->{title}) { # is($movie->{code}, $person_info{film}->{code}, 'movie code'); # is($movie->{year}, $person_info{film}->{year}, 'movie code'); # is($movie->{role}, $person_info{film}->{role}, 'movie code'); # $f = 1; # last; # } #} #is($f, 1, 'filmography'); IMDB-Film-0.53/t/m7_get_movie_by_info_offline.t0000644000175000017500000000045711730353345021061 0ustar michaelmichaeluse Test::More tests => 4; use IMDB::Film; my $obj = new IMDB::Film(crit => 't/test.html', debug => 0, cache => 0); is($obj->status, 1, 'Object status'); is($obj->code, '0332452', 'Movie IMDB Code'); is($obj->title, 'Troy', 'Movie Title'); is($obj->cast->[0]{name}, 'Julian Glover', 'Movie Person'); IMDB-Film-0.53/t/test.html0000644000175000017500000027307311730353344014756 0ustar michaelmichael Troy (2004) - IMDb

Troy (2004)

R  163 min  -  Action | Romance   -  Available on demand
Troy Poster
    1 2 3 4 5 6 7 8 9 10 7.0/10 X  
Users: (130,397 votes) 1,611 reviews | Critics: 241 reviews

An adaptation of Homer's great epic, the film follows the assault on Troy by the united Greek forces and chronicles the fates of the men involved.

Writers:

Homer (poem), David Benioff (screenplay)

Release Date:

14 May 2004 (USA)
Watch Trailer »
Nominated for Oscar. Another 3 wins & 17 nominations See more »

Photos

Cast

Cast overview, first billed only:
Julian Glover Julian Glover ...
Brian Cox Brian Cox ...
Nathan Jones Nathan Jones ...
Adoni Maropis Adoni Maropis ...
Jacob Smith Jacob Smith ...
Brad Pitt Brad Pitt ...
John Shrapnel John Shrapnel ...
Brendan Gleeson Brendan Gleeson ...
Diane Kruger Diane Kruger ...
Eric Bana Eric Bana ...
Orlando Bloom Orlando Bloom ...
Siri Svegler Siri Svegler ...
Lucie Barat Lucie Barat ...
Ken Bones Ken Bones ...
Manuel Cauchi Manuel Cauchi ...

Storyline

It is the year 1250 B.C. during the late Bronze age. Two emerging nations begin to clash after Paris, the Trojan prince, convinces Helen, Queen of Sparta, to leave her husband Menelaus, and sail with him back to Troy. After Menelaus finds out that his wife was taken by the Trojans, he asks his brother Agamemnom to help him get her back. Agamemnon sees this as an opportunity for power. So they set off with 1,000 ships holding 50,000 Greeks to Troy. With the help of Achilles, the Greeks are able to fight the never before defeated Trojans. But they come to a stop by Hector, Prince of Troy. The whole movie shows their battle struggles, and the foreshadowing of fate in this remake by Wolfgang Petersen of Homer's "The Iliad." Written by Mensur Gjonbalaj  

Plot Summary | Plot Synopsis

Plot Keywords:

Trojan | Greek | Fate | Prince | Epic  | See more »

Taglines:

For Love See more »

Genres:

Action | Romance

Motion Picture Rating (MPAA)

Rated R for graphic violence and some sexuality/nudity. See all certifications »

Parents Guide:

View content advisory »

Details

Country:

USA | Malta | UK

Language:

English

Release Date:

14 May 2004 (USA) See more »

Also Known As:

Troya See more »

Filming Locations:

Blue Lagoon, Comino, Malta See more »

Box Office

Budget:

$175,000,000 (estimated)

Opening Weekend:

$46,865,412 (USA) (16 May 2004) (3411 Screens)

Gross:

$133,378,256 (USA) (30 September 2004)
See more »

Company Credits

Show detailed company contact information on IMDbPro »

Technical Specs

Runtime:

163 min  | Germany: 189 min (director's cut)  | 196 min (director's cut)  | Turkey: 146 min (TV version)  | Germany: 145 min (TV version)

Sound Mix:

Dolby Digital  | SDDS  | DTS

Color:

Color

Aspect Ratio:

2.35 : 1
See full technical specs »

MOVIEmeter:

Up 33% in popularity this week. See why on IMDbPro

Fun Facts

Trivia

Brad Pitt and Eric Bana did not use stunt doubles for their epic duel. They also made a gentlemen's agreement that they would each pay the other for every accidental hit they made. The agreed-upon amounts were $50 for each light blow and $100 for each hard blow. Pitt ended up paying $750 to Bana, who didn't owe Pitt anything. See more »

Goofs

Anachronisms: When the Greek leaders are lining up to offer gifts to Agamemnon, one of them is carrying a red-figure vase shaped like a submarine. Red-figure pottery (made of red clay with a black glaze, from which lines and shapes are removed to make red images) was not made until the fifth century BCE. See more »

Quotes

[first lines]
Odysseus: [voiceover] Men are haunted by the vastness of eternity. And so we ask ourselves: will our actions echo across the centuries? Will strangers hear our names long after we are gone, and wonder who we were, how bravely we fought, how fiercely we loved?
See more »

Connections

Featured in Troy: The Passion of Helen (2004) See more »

Soundtracks

"Remember"
Music by James Horner
Lyric by Cynthia Weil
Produced by David Foster
Performed by Josh Groban with Tanja Tzarovska
Josh Groban appears courtesy of 143 Records/Reprise Records See more »

Frequently Asked Questions

See more (Spoiler Alert!) »

User Reviews

 
Good film for war/history fans, flawed, but worth every penny
19 May 2004 | by rainman-33 (Texas, USA) – See all my reviews

Troy is an excellent movie. For any war/history buff there is enough here to feed upon to overlook any flaws.

First, in response to all the Gladiator lovers who said on the boards that there is no one to cheer for in Troy, I say they are idiots. Gladiator was about a single protagonist. Homer's Iliad was always a complicated, ensemble story. The audience has to deal with a lot of main characters and THIS IS A GOOD THING. Its the Iliad, not Batman.

There was a complaint about the film not having a good side to relate to. This one irritates me. Real life seldom has the simplistic good guy vs. bad guy dichotomy. This in my mind makes Troy that much more believable. When events unfold I actually believed they could happen. Japanese cinema is so good at times precisely because we don't know who the good guy is. The question is simply irrelevant.

The script was written with a mind to keep the important details of the original story intact but to make it as realistic as possible. The gods are there but only in spirit. They don't get directly involved in the action like the original. I think this is a good thing as well. Troy looks like historical recreation rather than a literal translation of the poem. In one scene I thought there was an unlikely event and researched only to find it actually is in the Iliad. When the writer was asking for too much, he was in fact being true to the text. My bad.

OK, visually this film is amazing. Not just the army special effects but the sets and scenery are all beautiful. The costuming is first rate and feels very authentic. Remember, we are going back 3200 years. Quite an accomplishment.

The violence is likewise beautiful. Blood and guts galore, but interestingly it is both on the battlefield AND in single combat. A fight fan will appreciate the attention to detail in the combatants' moves. I had never seen a shield wielded so realistically on film. Spear and sword are given very realistic treatments as well.

Brad Pitt is a good actor. No question about that. Here he has a few moments where he seems out of place, a pretty boy in a soldier's world. But the combat scenes with him are more than enough to make up for that. It has already been discussed how much bigger he is than in Fight Club. The womens will have plenty to look at. His character is complicated and this is also true to the Iliad. Brad Pitt does this internal conflict lots of justice. His actions in the film really seem appropriate. I never asked, like I do in other films, "Why did he do that?" But this is not Brad Pitt's film. It's Eric Bana's.

Eric Bana was amazing. If Achilles was complex, then Bana's Hector is even more so. I had only seen Bana in Black Hawk Down and The Hulk and while BHD was good, there wasn't much for his character to do but be a soldier. The Hulk was so bad I wrote him off completely, blaming his acting for not saving a horrible script. But here in Troy I have new-found respect. He is the main character in the film if you judge by acting power. Lots of emotional struggling going on here that Bana takes on like a pro. He will join this generation's acting elite if he finds more roles like this.

The rest of the cast is good enough with a special note for Peter O'Toole and Brian Cox. Their lines are well delivered and their characters are believable.

The writing is good as far as plot development goes but I would take a few points away for some of the modern vocabulary. "Stop playing with me," the pretty Helen tells Paris. "Playing" should have been "joking" in that scene since I associate playing with modern English and even worse, with modern hip hop English. I shouldn't be getting that feeling in an ancient epic.

A+


221 of 413 people found this review helpful.  Was this review helpful to you?

Recommendations

Message Boards

Recent Posts (updated daily)
Peter O'Toole Hated 'Troy' bmw2009
(Spoiler) What do you think would have happened.... ascott39
Best sword and sandal epic ever made? rockblueengland
Who will play Odysseus in the sequel? jimmichaletos-763-991624
This movie is insult to the myth! matejh-1989
Discuss Troy (2004) on the IMDb message boards »

Contribute to this page


Explore more about this title


IMDB-Film-0.53/t/p3_get_person_by_wrong_name.t0000644000175000017500000000044411730353344020741 0ustar michaelmichaeluse Test::More tests => 4; use IMDB::Persons; my %pars = (crit => 'hhhhhhhhhhhhh', cache => 0, debug => 0); my $person = new IMDB::Persons(%pars); is($person->error, 'Not Found', 'error'); is($person->status, 0, 'status'); is($person->code, undef, 'code'); is($person->name, '', 'name'); IMDB-Film-0.53/META.json0000664000175000017500000000223612071605164014257 0ustar michaelmichael{ "abstract" : "OO Perl interface to the movies database IMDB.", "author" : [ "Michael Stepanov " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120630", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "IMDB-Film", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Cache::FileCache" : "0", "Carp" : "0", "Digest::SHA1" : "0", "Error" : "0", "HTML::Entities" : "0", "HTML::TokeParser" : "2.28", "LWP::Simple" : "1.41", "Pod::Checker" : "0", "Text::Unidecode" : "0" } } }, "release_status" : "stable", "version" : "0.53" } IMDB-Film-0.53/ChangeLog0000644000175000017500000002657512071605137014422 0ustar michaelmichaelRevision history for Perl module IMDB::Film 0.53 Jan 04 2013 - fixed search functionality; - fixed parsing of movie data. 0.52 Apr 30 2012 - fixed retrieving episodes of TV series following IMDB change (ticket #74679) [ARJONES]; - fixed issue with movie connection parsing. 0.51 Sep 28 2011 - fixed retrieving of moive rating (ticket #71117); - fixed official movie sites test. 0.50 Aug 09 2011 - fixed retrieving of movie rating (ticket #69049); - fixed returning of MPAA rating; - fixed parsing of movie title; - fixed parsing of person name; - fixed variuos tests. 0.49 Nov 25 2010 - fixed issue with returning the episodes of TV series; - made movie kind low case to have back compatibility; - fixed retrieving year of movie; - fixed retrieving bio of the movie person; - fixed tests; 0.48 Oct 19 2010 - fixed bug with retrieving of movie cover if the title contains special HTML symbols, ticket #62254; - added returning of default IMDB image in case if movie doesn't have a cover; - fixed issue with retrieving of movie's plot; - added a new method - storyline; - fixed bug with return of movie's kind; - fixed issue with not completed year period, i.e 2004-, ticket #62174; - added a few new tests. 0.47 Oct 12 2010 - fixed module functionality according to new IMDB design. 0.46 Sep 10 2010 - added possibility to get big size covers; - fixed retrieving of cover for non-English movies; - fixed bug with parsing of the movie title on the search page, ticket #55739; - fixed plot parsing. 0.45 Mar 19 2010 - fixed parsing of movie top info (thanks to Stefan Göbel for the patch); - added new test for top movie info; - fixed a few tests. 0.44 Mar 17 2010 - fixed issue with retrieving movie by its title (thanks to Peter Valdemar Mørch for patch); - fixed issue with parsing person birthday and birthplace; - fixed tests. 0.43 Nov 12 2009 - fixed issue with retrieving plot keywords instead of plot (thanks to Justin Fletcher for the bugreport and patch, for ticket #51240); - fixe issue with parsing Top 250 or Bottom 100 movie property (thans for Byju for bugreport); - fixed parsing AKA movie info (thanks to Milos Vavrek for bugreport, ticket #52729); 0.42 Oct 8 2009 - added keywords for the film; - fixed issue with retrieving of plot contained a link (thanks to Byju for the bug-report); - fixed issue with displaying special HTML symbols (ticket #49060); - fixed POD documentation. 0.41 Jul 30 2009 - added retrieving of recommendation movies; - fixed issue with using of uninitialized value in pattern match (thanks to Byju); - fixed issue with wrong item in the list of movie directors. 0.40 Jul 11 2009 - added top info into rating array (requested by Geoffrey Hoffman); - fixed pod errors (thanks to Bas Zoetekouw, ticket #47433). 0.39 Jul 03 2009 - added additional attributes such "re-release", "DVD premiere" etc from the release date page (requested by Vincent Lefevre, ticket #47457); - added support for companies and movie connections (thanks to Justin for the patch, ticket #42756); - fixed retrieving release date information (reported by Vincent Lefevre, ticket #47457); - reorganize tests. 0.38 Jun 30 2009 - fixed issue with empty cast list (thanks to Andréas Bratell); - fixed issue with retrieving metadata for movies with code less then 7 digits (thanks to Simon), ticket #47422; - fixed POD documentation (thanks to Bas Zoetekouw), ticket #47433). 0.37 May 25 2009 - added MPAA info for the specified movie; - fixed issue with retrieving of filmography for the specified actor or actresse (thanks to Cento for the bugreport); - fixed issue with retrieving metadata for movies with title contained only digits, i.e. 300 (thanks to Eric Johnson for bugreport); 0.36 Jan 30 2009 - fixed issue with parsing TV Shows information (thanks to Tom); - fixed issue with retrieving movie person name; - fixed a few test; 0.35 29 Sep 2008 - fixed a few bugs. 0.34 Jun 12 2008 - fixed issue with parsing user rating (thanks to Faidon Liambotis for his patch); - fixed module documentation. 0.33 Jun 09 2008 - fixed a bug with parsing a list of countries; - fixed a bug with parsing a list of language; - fixed a bug with parsing a list of certificates; - fixed a bug with list of matches (thanks to Dan Faerch for bug-report and patch); - fixed a bug with searching by movie title in case if it a number (thanks to Brian Wilson for bug-report and suggestion). 0.32 Dec 28 2007 - fixed a bug with retrieving movie cast (thanks to David Sullivan for his patch); - added tests for the TV series; - fixed a bug with parsing a person filmography. 0.31 Nov 16 2007 - added functionality to retrieve data of TV series: indicate is it TV series of not and getting a list of episodes (thanks to Branislav Gerzo for the patch); - added new tests to check TV series functionlity; - modified a procedure of getting trivia text; - fixed a bug with retrieving cast details (thanks to Matthias Hopf for patch). 0.30 Sep 13 2007 - modified a functionlity to retrieve cast; - fixed a bug with return a goofs (thanks to John Norton for bug-report); - added localization of variable $/ (thanks to John Norton for bug-report); - fixed a few bugs in the tests. 0.29 Jul 18 2007 - added possibility to get movie by its title and year (good idea given by Ohad Ben-Cohen); - modified a search procedure to fit a new IMDB layout (thanks to Danial Pearce, Peter Valdemar Mørch for bug-reports and patches); - modified retrieving a list of official sites and released dates; - fixed a bug with parsing writers movie info in case if there is only one person (thanks to Szel Miklos for bug-report). 0.28 May 07 2007 - added a new method - aspect_ratio, to get movie aspect ratio; - fixed a bug with retrieving movie runtime (thanks to Steve Meier for bugreport). 0.27 Apr 16 2007 - fixed a bug with parsing of list of movie directors and writers (thanks to Nick Johnston for his patch and Benjamin Juang and Bas for bugreports). 0.26 Apr 02 2007 - fixed a bug with parsing directors and writers (thanks to Andy Dales for the bugreport); - added a few new tests; - updated a module documentation. 0.25 Mar 02 2007 - fixed a bug with retrieving of movie rating (thanks to Arne Brutschy, Ulrich Tueshaus and Nick Johnston for bug reports and patches); - fixed a retrieving of movie certifications (thanks to Nick Johnston); - added new tests for rating and certifications. 0.24 Feb 20 2007 - modified a logic of IMDB::Film and IMDB::Person according to the new layout of IMDB site. 0.23 Dec 19 2006 - added a new method to retrieve a release dates (thanks to Danial Pearce); - added a new method to retrieve a list of quotes (thanks to buu); - fixed a bug with retrieving movie cover in case when its title contains some special symbils (thanks to Thomas Hoff); - added tests for new functionality. 0.22 Aug 1 2006 - modified a procedure of parsing cast (thanks to drmarker for contibution); - removed a request for retrieving of movie official sites from the base initialization procedure (thanks to Danial Pearce); - fixed a bug with parsing movie title if the title contains some special symbols such '*' (thanks to Matthew Bone for bugreport); - fixed a bug with retrieving a cover if it isn't uploaded (Brano Gerzo). 0.21 May 17 2006 - added retrieving official site urls for specified movie; - added possibility to clean cached data; - added new test for official sites; - fixed a bug with retrieving a filmography of specified movie person (thanks to Przemek Klys); - fixed a bug with test of full plot of movie; - fixed a bug with test of movie trivia. 0.20 Mar 10 2006 - added possibility to specify a path for cached data (thanks to Brano Gerzo); - added new statuses to separate objects retrieved from internet, cache or file; - added test to check cache functionality. 0.19 Jan 16 2006 - fixed a bug related with search by movie title contained some special symbols such "&" (thanks to Peter Backman); - fixed a bug with retrieving a movie cover (thanks to Len Kranendonk); - fixed a bug with retrieving a list of cast of TV series (thanks to Bas); - added prerequest module Digest::SHA1 (thanks to CPAN testers). 0.18 Dec 30 2005 - fixed a bug with retrieving ID of writers (thanks to Brano Gerzo for bugreport); - fixed a bug with retrieving a list of writers if there is a link 'more'; - fixed a documentation of method 'awards'. 0.17 Dec 15 2005 - moved functionality to get a page via HTTP to the separate method to it for getting of movie full plot; - fixed a bug with retrieving full plot (thanks to halcyon); - fixed a bug related with matched results if there is an only one; - fixed module documentation; - added new tests to cover bugs described above. 0.16 Dec 14 2005 - added retrieving of AKA info (requested by Brano Gerzo); - added retriving of movie trivia; - added retriving of movie goofs; - added retrieving of movie avards; - fixed a bug with adding full plot into cache. 0.15 Nov 18 2005 - added possibility to pass HTML page from IMDB instead of connection and getting page online (thanks to Brano Gerzo for idea); - switched to LWP::Simple from LWP::UserAgent; - added possibility to specify timeout and user agent for HTTP request; - removed a retrieving of a full plot from initialization stage; - improved test suite. 0.14 Aug 22 2005 - fixed a bug with search film by title (reported by Scott D'Aquila and Kwesi Leggett); - fixed a bug with search person by name; - fixed a bug with define proxy address (reported by Bas Zoetekouw); - fixed bugs with movies and persons data in the test script. 0.13 Jun 03 2005 - fixed a bug with craching of search when no any matches were found (reported by Peter Bäckman); - added a new property - status which indicates is successful or not information was retrieved from IMDB; - added a new property - id which is the same as code because it's not clear that IMDB code is like id. 0.12 Mar 07 2005 - fixed a bug with retrieving information about movie persons in case no proxy server; - added an suppression of pseudo-hash warnings. 0.11 Mar 04 2005 - fixed a bug with retrieving a list of casts in case if there are only credited casts (thanks to Steve Rushe); - fixed a bug with define a proxy in the class IMDB::Persons. - fixed a bug with retrieve a list of casts if there are only complete credited cast; - fixed a bug with assing a person IMDB code in case when we make a search by its name; - fixed a bug with assing a movie IMDB code when movie detailed page doesn't contain rating; 0.10 Jan 07 2005 - moved all common functionality into base class; - added a new class to retrieve an information about IMDB persons; - modified a test; - fixed a bug with undefined value in the method 'rating'. - fixed a bug with using fields. 0.05 Dec 28 2004 - added a new method - full_plot to retrieve a full novie plot; - fixed a bug with retrieve a title and production year of movie in case of search by movie title; - fixed bugs with test. 0.04 Sep 09 2004 - added roles to the retrieving data about cast; - added possibility to retrieve number of votes; - fixed a bug with retrieving directors for movie which doesn't contains writers info. 0.03 Jul 31 2004 - fixed bug with retrieving film information by its title; - corrected class documentation; 0.02 Jul 28 2004 - fixed class documentation; 0.01 Jul 27 2004 - original version; created by ExtUtils::ModuleMaker 0.32 IMDB-Film-0.53/MANIFEST0000644000175000017500000000116112071605164013761 0ustar michaelmichaelChangeLog lib/IMDB/BaseClass.pm lib/IMDB/Film.pm lib/IMDB/Persons.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP META.yml README t/01_base.t t/m1_get_movie_by_code.t t/m2_get_movie_by_title.t t/m3_get_movie_by_wrong_title.t t/m4_get_movie_by_title_single_match.t t/m5_get_movie_by_title_without_rate.t t/m6_get_movie_by_title_with_cr_casts.t t/m7_get_movie_by_info_offline.t t/p1_get_person_by_name.t t/p2_get_person_by_code.t t/p3_get_person_by_wrong_name.t t/p4_get_person_info_offline.t t/test.html t/test_p.html Todo META.json Module JSON meta-data (added by MakeMaker) IMDB-Film-0.53/LICENSE0000644000175000017500000005010111730353345013635 0ustar michaelmichaelTerms of Perl itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --------------------------------------------------------------------------- The General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS --------------------------------------------------------------------------- The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End