Re: Release connections in MODPERL - Mailing list pgsql-novice

From Brett W. McCoy
Subject Re: Release connections in MODPERL
Date
Msg-id Pine.LNX.4.30.0101110025240.19850-100000@chapelperilous.net
Whole thread Raw
In response to Re: Release connections in MODPERL  ("D. Duccini" <duccini@backpack.com>)
List 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


pgsql-novice by date:

Previous
From: "Brett W. McCoy"
Date:
Subject: Re: Release connections in MODPERL
Next
From: "rob"
Date:
Subject: Re: converting .xls to delimited file