NAME

POE::Component::IMDB - POE Component for interfacing with the IMDB database of films.

SYNOPSIS

use lib 'lib';
use POE;
use POE::Session;
use POE::Component::IMDB;
use Data::Dumper;

my $session = POE::Session->create(
	package_states => [
		main => [ qw/_start imdb_FetchedMovie/ ],
	],
);

sub _start
{
	my( $heap, $kernel ) = @_[HEAP,KERNEL];
	
	$heap->{imdb} = POE::Component::IMDB->new( qw/imdb_FetchedMovie/ );
	$heap->{imdb}->fetch_movie("full metal jacket");
}

sub imdb_FetchedMovie
{
	my( $heap, $movie_object ) = @_[HEAP,ARG0];
	
	print Dumper $movie_object;
}

$poe_kernel->run;

DESCRIPTION

This is a module created to allow easy POEish access to the IMDB. The interface at this point is extremely trivial.

Simply create the POE::Component::IMDB object via ->new, then call $object->fetch_movie($movie_title). The title is then searched for and a collection of information about the title is prepared. The module will automatically feed your query to the search engine if nothing matches the title exactly, and will follow the first link the search engine returns.

Once it has fetched and parsed all of interesting data about the movie, the object sends an event to the session where the object was instantiated, named "imdb_FetchedMovie".

This event contains one argument, a reference to a movie information object, which at this point is simply a hash reference full of data.

SEE ALSO

POE,IMDB.com, and so forth.

AUTHOR

BUU

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.0.0 or, at your option, any later version of Perl 5 you may have available.