Re: PL/Perl regression tests with use_strict

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: PL/Perl regression tests with use_strict
Date: 2005-08-24 14:12:04
Message-ID: 20050824141203.GA53239@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-08-24 14:28:31 Re: PL/Perl regression tests with use_strict
Previous Message Bruce Momjian 2005-08-24 14:08:41 Re: PATCH to allow concurrent VACUUMs to not lock each