The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

FilmAffinity::Movie - Perl interface to FilmAffinity

VERSION

Version 1.01

SYNOPSIS

Retrieve information about a filmaffinity movie

use FilmAffinity::Movie;

my $movie = FilmAffinity::Movie->new(
  id    => $movieID,
  delay => $delay || 5,
);

$movie->parse();

Via the command-line program filmaffinity-get-movie-info.pl

DESCRIPTION

Overview

FilmAffinity::Movie is a Perl interface to FilmAffinity. You can use this module to retrieve information about a movie.

Constructor

new()

Object's constructor. You should pass as parameter the movieID

my $movie = FilmAffinity::Movie->new( id => '932476' );

Options

delay

Set the minimum delay between requests to the server, in seconds.

my $parser = FilmAffinity::Movie->new(
  userID => '932476',
  delay  => 20,
);

By default, the delay is 5 seconds

ACCESSORS

$movie->id

get id

$movie->title

get title

$movie->originaltitle

get original title

$movie->year

get year

$movie->duration

get running time (in minutes)

$movie->synopsis

get synopsis

$movie->website

get url of the movie website

$movie->country

get country

$movie->cover

get url of the cover

$movie->rating

get site rating

$movie->myrating

get personal rating

$movie->votes

get number of votes

$movie->genre

get genres list

$movie->topic

get topics list

$movie->cast

get cast list

$movie->director

get directors list

$movie->composer

get composers list

$movie->screenwriter

get screenwriters list

$movie->cinematographer

get cinematographers list

$movie->studio

get studios list

$movie->producer

get producers list

SUBROUTINES/METHODS

$movie->parse()

This method will get the content of the filmaffinity webpage and retrieve all information about the movie

$movie->getContent()

This method will get the content of the filmaffinity webpage

$movie->parsePage($content)

This method parses a page of filmaffinity that is available as a single string in memory.

$movie->toJSON()

This method will export all movie informations in JSON format

AUTHOR

William Belle, <william.belle at gmail.com>

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-filmaffinity-userrating at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FilmAffinity-UserRating. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc FilmAffinity::Movie

You can also look for information at:

SEE ALSO

http://www.filmaffinity.com

LICENSE AND COPYRIGHT

Copyright 2013 William Belle.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.