[Maypole] Maypole::CLI output is inconsistent with the browser output

From: Seth Gordon (sethg at ropine.com)
Date: Mon Nov 29 2004 - 19:41:12 GMT


I'm testing an application-under-development with Maypole::CLI. The
test script is simple:

[quote]
#!/usr/bin/perl

use Maypole::CLI qw(JeevesLibrary);
use Maypole::Constants;
$ENV{MAYPOLE_TEMPLATES} = "/var/www/htdocs/library";

print JeevesLibrary->call_url("http://dynamic.ropine.com/library/");
[unquote]

When I run the script with no arguments, I get the following:

[quote]
Debugging enabled at
/usr/local/libdata/perl5/site_perl/Maypole/Application.pm line 19.
Loaded tables:
authors,book_language,dialect_names,language_names,title_author_rel,titles,volumes
at /usr/local/libdata/perl5/site_perl/Maypole/Model/CDBI.pm line 226.
$VAR1 = [
           'JeevesLibrary::Authors',
           'JeevesLibrary::BookLanguage',
           'JeevesLibrary::DialectNames',
           'JeevesLibrary::LanguageNames',
           'JeevesLibrary::TitleAuthorRel',
           'JeevesLibrary::Titles',
           'JeevesLibrary::Volumes'
         ];
Use of uninitialized value in hash element at
/usr/local/libdata/perl5/site_perl/Maypole.pm line 134.
Use of uninitialized value in exists at
/usr/local/libdata/perl5/site_perl/Maypole.pm line 138.
file error - : not found at
/usr/local/libdata/perl5/site_perl/Maypole/View/Base.pm line 74.
[unquote]

However, when I view http://dynamic.ropine.com/library/ in my browser, I
get an actual Web page, and the following in my error_log:

[quote]
Debugging enabled at
/usr/local/libdata/perl5/site_perl/Maypole/Application.pm line 19.
Loaded tables:
authors,book_language,dialect_names,language_names,title_author_rel,titles,volumes
at /usr/local/libdata/perl5/site_perl/Maypole/Model/CDBI.pm line 226.
$VAR1 = [
           'JeevesLibrary::Authors',
           'JeevesLibrary::BookLanguage',
           'JeevesLibrary::DialectNames',
           'JeevesLibrary::LanguageNames',
           'JeevesLibrary::TitleAuthorRel',
           'JeevesLibrary::Titles',
           'JeevesLibrary::Volumes'
         ];
[unquote]

The relevant section of my httpd.conf is:

[quote]
# Maypole test
<Perl>
   use lib '/home/sethg/bin';
</Perl>
<Location /beerdb>
   SetHandler perl-script
   PerlHandler BeerDB
</Location>
<Location /library>
   SetHandler perl-script
   PerlHandler JeevesLibrary
</Location>
[unquote]

I want the output of the CLI script to give me the same pieces of text
that would be sent to the browser and to the error log. What am I doing
wrong?

-- 
"If John Kerry was the last best hope for the Republic ... then maybe
  it wasn't worth saving in the first place.  I don't believe that,
  though. And neither do you." --Dan Layman-Kennedy
// seth gordon // sethg at ropine.com // http://dynamic.ropine.com/yo/ //

_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT