I'm trying to rig together a fairly minimal Maypole app to look at the contents of a database. As soon as I try to introduce a : Exported method into the app I get invalid code attribute errors like this:

[Tue Oct 25 10:04:13 2005] [error] Invalid CODE attribute: Exported at /usr/loca l/src/Literature/Literature.pm line 13\nBEGIN failed--compilation aborted at /us r/local/src/Literature/Literature.pm line 13.\nCompilation failed in require at
(eval 29) line 3.\n
[Tue Oct 25 10:04:13 2005] [error] Undefined subroutine &Literature::handler cal
led.\n


For the moment, the other maypole app on this machine is not running (although when it does, it works fine, and it has plenty of Exported methods in it), and the httpd.conf is out-of-the box clean.


The whole app is as follows:

httpd.conf:

<perl>
use lib qw( /usr/local/src/Literature );
</perl>

<Location /lit>
               SetHandler perl-script
               PerlHandler Literature
</Location>

and the driver:

package Literature;
use warnings;
use strict;
use Maypole::Application qw(-Debug );

Literature->setup("dbi:mysql:prosthetic", "root");
Literature->config->uri_base("http://localhost/lit";);
Literature->config->{template_root} ="/usr/local/src/Literature/ templates"; Literature->config->{application_name} = "Restoration Ecology Literature Search";
Literature->config->rows_per_page(100);
Literature->config->display_tables([qw/journal/]);
Literature::Journal->untaint_columns( printable => [qw/bibref/]);
{
  package Journal;
  sub fulltext : Exported {}
}
1;

Is there something simple I'm missing?


kd


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to