[Maypole] Can't locate object method "new" via package "Class::DBI::Loader::"

Dana Hudes dhudes@hudes.org
Tue, 1 Feb 2005 21:20:35 -0500 (EST)


Testing with Maypole CLI as well as Apache. CDBIL v0.12 . 
The difference in the errors is that in apache it complains its a bad DSN.
This is all on Linux with Perl 5.8.1


#!/usr/bin/perl package
photogallery; use warnings; BEGIN {
  use Apache::Reload;
  use vars qw (%ENV @ISA  @EXPORT @EXPORT_OK %EXPORT_TAGS);
  $ENV{MAYPOLE_CONFIG} = '/home/dhudes/photogallery.yaml';
  $ENV{MAYPOLE_TEMPLATES} = '/srv/www/htdocs/sites/sitedb/factory';
  use CGI::Carp  qw(fatalsToBrowser);
}
use CGI::Carp  qw(fatalsToBrowser);

use Maypole::Constants;
use Maypole::Application qw(Config::YAML Loader Untaint   -Setup);


1;
===============
photogallery.yaml:

--- #YAML:1.0
dsn: 'dbi:Pg:dbname=photogalleries;host=127.0.0.1'
user: dhudes
pass: Oner0us492
uri_base: 'http://sitedb.advancedsolutions.biz/dbgui'
template_root: '/srv/www/htdocs/sites/sitedb/templates'
rows_per_page: 10
untaint_columns:
   keywords:
      html:
         - label
   websites:
      html: 
         - site_name
         - subjects_template
         - gallery_template
         - css
      Filenames:
         - doc_root
         - secured_root
         - galleries_dir
         - gallery_thumbs_path
         - subject_thumbs_path
         - gallery_list
         - subject_list
      url:
         - secured_url
   galleries:
      integer:
         - quantity
      upload:
         - sample_picture
      boolean: 
         - released
         - video
      date:   
         - publicationDate
         - embargoDate
      html:
         - title
         - description
============
result:
dhudes@screamer:~> perl -w  -MMaypole::CLI=photogallery  
Content-type: text/html

<h1>Software error:</h1>
<pre>Couldn't require photogallery - Can't coerce array into hash at 
/usr/lib/perl5/site_perl/5.8.1/Maypole/Plugin/Untaint.pm line 65.
BEGIN failed--compilation aborted at photogallery.pm line 26.
Compilation failed in require at 
/usr/lib/perl5/site_perl/5.8.1/Maypole/CLI.pm line 22.
BEGIN failed--compilation aborted.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error 
message 
and the time and date of the error.

</p>
[Tue Feb  1 21:19:54 2005] -: Couldn't require photogallery - Can't coerce 
array into hash at 
/usr/lib/perl5/site_perl/5.8.1/Maypole/Plugin/Untaint.pm line 65.
[Tue Feb  1 21:19:54 2005] -: BEGIN failed--compilation aborted at 
photogallery.pm line 26.
[Tue Feb  1 21:19:54 2005] -: Compilation failed in require at 
/usr/lib/perl5/site_perl/5.8.1/Maypole/CLI.pm line 22.
[Tue Feb  1 21:19:54 2005] -: BEGIN failed--compilation aborted.