Provided by: libimdb-film-perl_0.53-1_all bug


       IMDB::BaseClass - a base class for IMDB::Film and IMDB::Persons.


         use base qw(IMDB::BaseClass);


       IMDB::BaseClass implements a base functionality for IMDB::Film and IMDB::Persons.

   Constructor and initialization
           Object's constructor. You should pass as parameter movie title or IMDB code.

                   my $imdb = new IMDB::Film(crit => <some code>);


                   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.

           Initialize object. It gets list of service class properties and assign value to them
           from input parameters or from the hash with default values.

           Define an user agent for HTTP request. It's 'Mozilla/5.0' by default.  For more
           information refer to LWP::UserAgent.

           Define a timeout for HTTP request in seconds. By default it's 10 sec.  For more
           information refer to LWP::UserAgent.

           Get IMDB film code.

                   my $code = $film->code();

           Get IMDB film id (actually, it's the same as code).

                   my $id = $film->id();

           Store address of proxy server. You can pass a proxy name as parameter into object

                   my $imdb = new IMDB::Film(code => 111111, proxy => '');

           or you can define environment variable 'http_host'. For exanple, for Linux you shoud
           do a following:


           Store cache flag. Indicate use file cache to store content page or not:

                   my $imdb = new IMDB::Film(code => 111111, cache => 1);

           Store flag clear_cache which is indicated clear exisisting cache or not (false by

                   my $imdb = new IMDB::Film(code => 111111, cache => 1, clear_cache => 1);

           In case of using cache, we create new Cache::File object and store it in object's
           property. For more details about Cache::File please see Cache::Cache documentation.

           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.

           Store IMDB host name. You can pass this value in object constructor:

                   my $imdb = new IMDB::Film(code => 111111, host => '');

           By default, it uses ''.

           Store query string to retrieve film by its ID. You can define different value for

                   my $imdb = new IMDB::Film(code => 111111, query => 'some significant string');

           Default value is 'title/tt'.

           Note: this is a mainly service parameter. So, there is no reason to pass it in the
           real case.

           Store search string to find film by its title. You can define different value for

                   my $imdb = new IMDB::Film(code => 111111, seach => 'some significant string');

           Default value is 'Find?select=Titles&for='.

           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.

           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.

           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.

           Retrieve a simple movie property which surrownded by <B>.

           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!

           Return string which contains error messages separated by \n:

                   my $errors = $film->error();




       Please, send me any found bugs by email:


       IMDB::Persons IMDB::Film WWW::Yahoo::Movies HTML::TokeParser


       Mikhail Stepanov AKA nite_man (


       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.