Re: exception handling in plperlu

Поиск
Список
Период
Сортировка
От A.M.
Тема Re: exception handling in plperlu
Дата
Msg-id 8D7DE746-7E8A-40D3-B71F-222B14696CA0@themactionfaction.com
обсуждение исходный текст
Ответ на Re: exception handling in plperlu  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Список pgsql-general

On Mar 16, 2007, at 10:54 , Jasbinder Singh Bali wrote:

just wondeng why doesn't it let me put
my $dbh=DBI->connect("dbi:Pg:dbname=dbunmask; host=192.168.0.120; port=5432;", "", "");
in eval

says
Global symbol "$dbh" requires explicit package name at line <where ever dbh is used>


There is a mailing list for DBD::Pg:

But your problem in not related to the driver, rather it's a Perl issue. Your variable is defined within the block, so its scope is the eval block ("my" implies lexical scoping). If you define it outside the block and assign inside the block, then it will work.

Cheers,
M

В списке pgsql-general по дате отправления:

Предыдущее
От: "Robin Ericsson"
Дата:
Сообщение: Re: simple coordinate system
Следующее
От: "Adam Rich"
Дата:
Сообщение: Re: exception handling in plperlu