On Sat, 2005-04-09 at 14:35 -0700, Mark McWiggins wrote:
> Hi All,
> 
> "Plan to throw one away" (see *The Mythical Man-Month* by Brooks), 
> indeed: I've just about finished a more-complex
> than-I-thought web + database application and then too late thought 
> "gosh, nice if there were something like Hibertnate
> for Perl." A quick web search led me to Class::DBI, which looks like it 
> will eliminate 75% of the code I just wrote, and
> good riddance to it since I have to maintain the thing ongoing.
> 
> BUT ... I have a small example working as a standalone Perl script but 
> can't get it going inside mod_perl. I have a startup.pl
> script running successfully:
> 
> > use lib qw(/usr/local/apache2/perl);
> > use Class::DBI;
> > use Class::DBI::Pg;
> > use inforce;
> > 1;
> 
> 
> And the 'inforce' module is just simply:
> 
> > #!/usr/bin/perl
> >
> > use strict;
> > use base qw(Class::DBI::Pg);
> >
> > __PACKAGE__->set_db(Main => 'dbi:Pg:dbname=etracclass', 'nobody', '');
> > __PACKAGE__->set_up_table('inforce');
> >
> > 1;
> >
> 

why doesn't inforce have a package declaration?

i.e.  package inforce;

and you dont need #!/usr/bin/perl at the top for modules.

Also, why isnt 'inforce.pm' loading the Class DBI modules instead of the
startup.pl script..

We have Class::DBI working fine under mod_perl - I think its just your
implementation that needs refinement :)


> But I can't get my Apache::ASP page to recognize it with any combination of
> 
>     use inforce;
> 
> with or without the other classes above in 'startup.pl'. I get
>    
>     Can't's locate object method "search" via package 'inforce' ...
> 
> Obviously this is something simple -- thanks in advance for any guidance 
> whatsoever
> on this.
> 

This email and any files transmitted with it are confidential and intended 
solely for the 
use of the individual or entity to whom they are addressed. Please notify the 
sender 
immediately by email if you have received this email by mistake and delete this 
email 
from your system. Please note that any views or opinions presented in this 
email are solely
 those of the author and do not necessarily represent those of the 
organisation. 
Finally, the recipient should check this email and any attachments for the 
presence of 
viruses. The organisation accepts no liability for any damage caused by any 
virus 
transmitted by this email. 

Reply via email to