summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2005-08-24 19:24:54 +0000
committerTom Lane2005-08-24 19:24:54 +0000
commit163c89464485afd6190e3c5b2180fd76a664961f (patch)
treef787981f6793f72d74a5c76b2c7496fc2bfa946b
parent0a886a7e1ebde560c70495f320352a7ee8f5388c (diff)
Make the plperl regression tests pass in 'use_strict' mode, by adding
'my' where appropriate. Michael Fuhr
-rw-r--r--src/pl/plperl/expected/plperl.out6
-rw-r--r--src/pl/plperl/sql/plperl.sql6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
index 2ba89ea2c3..a2b34a78cb 100644
--- a/src/pl/plperl/expected/plperl.out
+++ b/src/pl/plperl/expected/plperl.out
@@ -336,7 +336,7 @@ SELECT perl_get_field((11,12), 'z');
-- Test return_next
--
CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$
-$i = 0;
+my $i = 0;
for ("World", "PostgreSQL", "PL/Perl") {
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
}
@@ -354,8 +354,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
-- Test spi_query/spi_fetchrow
--
CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$
-$x = spi_query("select 1 as a union select 2 as a");
-while (defined ($y = spi_fetchrow($x))) {
+my $x = spi_query("select 1 as a union select 2 as a");
+while (defined (my $y = spi_fetchrow($x))) {
return_next($y->{a});
}
return;
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
index c274659e7c..e6fc5c35dd 100644
--- a/src/pl/plperl/sql/plperl.sql
+++ b/src/pl/plperl/sql/plperl.sql
@@ -240,7 +240,7 @@ SELECT perl_get_field((11,12), 'z');
--
CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$
-$i = 0;
+my $i = 0;
for ("World", "PostgreSQL", "PL/Perl") {
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
}
@@ -253,8 +253,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
--
CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$
-$x = spi_query("select 1 as a union select 2 as a");
-while (defined ($y = spi_fetchrow($x))) {
+my $x = spi_query("select 1 as a union select 2 as a");
+while (defined (my $y = spi_fetchrow($x))) {
return_next($y->{a});
}
return;