Re: Release connections in MODPERL

Поиск
Список
Период
Сортировка
От Brett W. McCoy
Тема Re: Release connections in MODPERL
Дата
Msg-id Pine.LNX.4.30.0101110025240.19850-100000@chapelperilous.net
обсуждение исходный текст
Ответ на Re: Release connections in MODPERL  ("D. Duccini" <duccini@backpack.com>)
Список 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 по дате отправления:

Предыдущее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: Release connections in MODPERL
Следующее
От: "rob"
Дата:
Сообщение: Re: converting .xls to delimited file