Re: PL/Perl regression tests with use_strict

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: PL/Perl regression tests with use_strict
Дата
Msg-id 20050824141203.GA53239@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: PL/Perl regression tests with use_strict  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: PL/Perl regression tests with use_strict  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-patches
On Wed, Aug 24, 2005 at 09:50:06AM -0400, Andrew Dunstan wrote:
> Here's an updated patch incorporating Michael's ideas, and this time
> *with* a small regression test that dynamically turns strict mode on/off.

Shouldn't the $@ munging patterns include the /g flag so they remove
all occurrences of the pattern?

SET plperl.use_strict TO on;

CREATE FUNCTION foo() RETURNS integer AS $$
$x = 1;
$y = 2;
return $x + $y;
$$ LANGUAGE plperl;

ERROR:  creation of Perl function failed: Global symbol "$x" requires explicit package name at line 2.
Global symbol "$y" requires explicit package name at (eval 10) line 3.
Global symbol "$x" requires explicit package name at (eval 10) line 4.
Global symbol "$y" requires explicit package name at (eval 10) line 4.


--
Michael Fuhr

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: PL/Perl regression tests with use_strict
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PATCH to allow concurrent VACUUMs to not lock each