Re: Release connections in MODPERL

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: "D(dot) Duccini" <duccini(at)backpack(dot)com>
Cc: Pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Release connections in MODPERL
Date: 2001-01-11 05:39:22
Message-ID: Pine.LNX.4.30.0101110025240.19850-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 10 Jan 2001, D. Duccini wrote:

> > Except you mean undef, right? There is no null in Perl. Even so, though,
> > undef does not call object destructors (i.e., DESTROY method), only
> > decrements the reference count, which hopefully means it wil get garbage
> > collected.
>
> well, $SQL = null;
>
> compiles and produces the results described.
>
> undef would probably work as well

Just a caveat, since null is not defined in Perl:

Using null gives me either

Unquoted string "null" may clash with future reserved word at
pgtest line 7.

or (if using strict)

Bareword "null" not allowed while "strict subs" in use at pgtest
line 7

Another trick to help with mod_perl is not to make your database
connection a global variable, but a lexically scoped variable.

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
"All God's children are not beautiful. Most of God's children are, in fact,
barely presentable."
-- Fran Lebowitz

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message rob 2001-01-11 12:20:26 Re: converting .xls to delimited file
Previous Message Brett W. McCoy 2001-01-11 05:03:14 Re: Release connections in MODPERL