Skip site navigation (1) Skip section navigation (2)

Re: PL/Perl regression tests with use_strict

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Michael Fuhr <mike(at)fuhr(dot)org>
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:28:31
Message-ID: 430C840F.6020802@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches

Michael Fuhr wrote:

>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.
>
>  
>

good point.

Here's yet another revision ;-)

cheers

andrew

Attachment: plperl-strict3.patch
Description: text/x-patch (10.9 KB)

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-08-24 15:59:08
Subject: Re: FW: Win32 unicode vs ICU
Previous:From: Michael FuhrDate: 2005-08-24 14:12:04
Subject: Re: PL/Perl regression tests with use_strict

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group