On Mon, Oct 02, 2000 at 07:32:51PM +0400, Alexander Sobcanyuk wrote:
> а кстати
>
> как делать Persistant connection к Постгресу
> из мод перла???
А в handler-е коннектиться и все дела :)
В таком вот духе (DBI_phoenix - это наше поделие в духе Apache::DBI):
{
package HTML::Mason::Commands;
use locale;
use vars qw($dbh $r );
sub init_all
{
unless ($dbh)
{
$HTML::Mason::Commands::dbh
=DBI_phoenix->connect("dbi:Pg:dbname=top100shop","","");
}
}
require 'ini.pl';
}
....
my $inited = 0;
1;
sub handler
{
use locale;
my ($r) = @_;
unless($inited)
{
HTML::Mason::Commands::init_all();
$inited = 1;
}
$ah->handle_request($r);
}
Alex
=============================================================================
= Apache-Talk@xxxxxxxxxxxxx mailing list =
Mail "unsubscribe apache-talk" to majordomo@xxxxxxxxxxxxx if you want to quit.
= Archive avaliable at http://www.lexa.ru/apache-talk =
"Russian Apache" includes software developed
by the Apache Group for use in the Apache HTTP server project
(http://www.apache.org/) See
Apache LICENSE.
Copyright (C) 1995-2001 The Apache Group. All rights reserved.
Copyright (C) 1996 Dm. Kryukov; Copyright (C)
1997-2009 Alex Tutubalin. Design (C) 1998 Max Smolev.