I guess I don't know enough about your specific case. :)

On the systems I work on, I use "PerlRequire startup.pl" prior to loading 
anything else so that I can use the connection in subsequent code. Seems to 
work out fine for what I'm doing.

--Jeff

At 05:30 PM 5/14/00, svante sörmark wrote:
>yeah, i know about startup.pl, and i have been using it until now,
>but the goal here was to avoid having to put the same configuration
>in two different files :).
>
>Jeff Beard wrote:
> >
> > Checkout the sample startup.pl that comes with Apache::DBI.
> >
> > --Jeff
> >
> > At 05:08 PM 5/14/00, svante sörmark wrote:
> > >hi all,
> > >
> > >what i'd like to do is "pre-initialize" my DBI connections from whithin
> > >my PerlHandler's BEGIN block.
> > >
> > >something like this:
> > >BEGIN {
> > >         if ( Apache->dir_config('CONNECT_ON_INIT') {
> > > 
> Apache::DBI->connect_on_init(Apache->dir_config('DBI_INFO');
> > >         }
> > >}
> > >
> > >but of course the Apache* stuff isn't available at this stage...
> > >
> > >does anyone have a clever solution to this? i've resorted to `grep`ing
> > >httpd.conf for the DBI_INFO string, but that is sooo ugly.
> > >
> > >thanks.
> > >--
> > >------------------------------------------------------------------------
> > >Svante Sörmark | Chalmers University IT systems & services | 031-7728665
> > >------------------------------------------------------------------------
> >
> > Jeff Beard
> > _____________________________________________
> > Web:            www.cyberxape.com
> > Email:          jeff at cyberxape.com
> > Location:       Boulder, CO, USA
>
>--
>------------------------------------------------------------------------
>Svante Sörmark | Chalmers University IT systems & services | 031-7728665
>------------------------------------------------------------------------



Jeff Beard
_____________________________________________
Web:            www.cyberxape.com
Email:          jeff at cyberxape.com
Location:       Boulder, CO, USA



Reply via email to