WWW::Wikipedia::TemplateFiller installation guide
=================================================

The easiest way to install WWW::Wikipedia::TemplateFiller is via the
CPAN, which automatically checks for and installs dependencies as
needed. To do so, simply execute

  % cpan WWW::Wikipedia::TemplateFiller

from the command-line, or issue 'install
WWW::Wikipedia::TemplateFiller' from the cpan shell and specify that
you would like dependencies to be installed.

You will likely receive a number of warnings during the testing phase
of installation. It is safe to ignore these:

  t/01-fill.........ok 7/16Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Mechanize.pm line 449, <DATA> line 484.
  t/01-fill.........ok 8/16Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Mechanize.pm line 449, <DATA> line 484.
  t/01-fill.........ok 11/16Use of uninitialized value in length at /usr/local/lib/perl5/5.8.6/Text/ParseWords.pm line 29.
  t/01-fill.........ok 12/16Use of uninitialized value in length at /usr/local/lib/perl5/5.8.6/Text/ParseWords.pm line 29.

If anyone has a way to resolve these warnings, though, feel free to
drop me an email.

ISBNdb access
=============

Currently W::W::TF uses ISBdb for accessing information about
books. This will likely change in the future to allow for multiple
book databases to be queried. For now, to allow W::W::TF to use
ISBNdb, you must provide it an isbndb.com developer's access key.

Access keys can be provided to W::W::TF in three ways: for direct
access, for web access, and for testing. If you will be using W::W::TF
directly, pass the isbndb.com access key in your call to get():

  my $isbn = '12345xxx';
  my $key = 'MyAccessKey';

  use WWW::Wikipedia::TemplateFiller;
  my $filler = new WWW::Wikipedia::TemplateFiller();
  $filler->get( isbn => $isbn, isbndb_access_key => $key );

If you will be using W::W::TF::WebApp to provide web access to
W::W::TF, then the access key should be specified in the %config hash
of W::W::TF::WebApp.

For testing the ability of W::W::TF to query isbndb.com during 'make
test', provide the access key in an environment variable called
ISBNDB_ACCESS_KEY, as in:

  export ISBNDB_ACCESS_KEY=MyAccessKey

Then issue 'make test'.

Web access
==========

W::W::TF comes with a built-in web application for deploying the
template filler via the web. The application is coded in
W::W::TF::WebApp and uses the CGI::Application framework. An instance
script that uses W::W::TF::WebApp is available; it is called
cgi/index.cgi. Templates used by W::W::TF::WebApp are stored in
cgi/templates. To install these files, copy the cgi directory to your
cgi-bin directory and provide proper file permissions to files
contained therein. For example:

  % cp -r cgi /var/www/cgi-bin/templatefiller

For permissions, something like this ought to work:

  % chmod 655 /var/www/cgi-bin/templatefiller/index.cgi
  % chmod a+r /var/www/cgi-bin/templatefiller/templates/*

Update the $template_path variable in index.cgi to point to the
templatefiller/templates/ directory. Using the above paths, index.cgi
should be updated with something like this:

  my $template_path = '/var/www/cgi-bin/templatefiller/templates';

The template filler should then be available via a standard URL:

  http://yourhost.com/templatefiller/index.cgi

Author
======

David J. Iberri <diberri@cpan.org>
