Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-24 Thread Andrew Dunstan
Michael Fuhr said: On Tue, Aug 23, 2005 at 10:30:51PM -0600, Michael Fuhr wrote: Global symbol $x requires explicit package name at (eval 3) line 1. If I'm reading the Perl source code correctly (pp_ctl.c), the number following eval comes from a variable named PL_evalseq that's incremented

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-24 Thread Andrew Dunstan
I wrote: Michael Fuhr said: we might be able to do my $retval = eval($stuff); $@ =~ s/ \(eval \d+\) / /g if $@; return $retval; T It would probably be more efficient and less convoluted to munge this in a __DIE__ handler. The we wouldn't need the extra level of eval. e.g.

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-24 Thread Michael Fuhr
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

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-24 Thread Andrew Dunstan
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

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-24 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes: The attached patch allows the PL/Perl regression tests to pass when use_strict is enabled. I've also attached a variant of plperl_elog.out to account for an elog() message that shows a different line number when run under use_strict. Now that we've got

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-23 Thread Michael Fuhr
On Sat, Aug 20, 2005 at 01:52:42PM -0600, Michael Fuhr wrote: The attached patch allows the PL/Perl regression tests to pass when use_strict is enabled. I've also attached a variant of plperl_elog.out to account for an elog() message that shows a different line number when run under

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-23 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes: Here's an updated version of the PL/Perl regression test patch that works with Andrew Dunstan's strict mode patch, both when use_strict is enabled and when it's disabled. The variant of plperl_elog.out is no longer needed. Actually, the main reason I

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-23 Thread Michael Fuhr
On Tue, Aug 23, 2005 at 11:58:25PM -0400, Tom Lane wrote: Michael Fuhr [EMAIL PROTECTED] writes: Here's an updated version of the PL/Perl regression test patch that works with Andrew Dunstan's strict mode patch, both when use_strict is enabled and when it's disabled. The variant of

Re: [PATCHES] PL/Perl regression tests with use_strict

2005-08-23 Thread Michael Fuhr
On Tue, Aug 23, 2005 at 10:30:51PM -0600, Michael Fuhr wrote: Global symbol $x requires explicit package name at (eval 3) line 1. If I'm reading the Perl source code correctly (pp_ctl.c), the number following eval comes from a variable named PL_evalseq that's incremented each time it appears

[PATCHES] PL/Perl regression tests with use_strict

2005-08-20 Thread Michael Fuhr
The attached patch allows the PL/Perl regression tests to pass when use_strict is enabled. I've also attached a variant of plperl_elog.out to account for an elog() message that shows a different line number when run under use_strict. -- Michael Fuhr Index: src/pl/plperl/sql/plperl.sql