Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06f4a53

Browse files
committed
Make the plperl regression tests pass in 'use_strict' mode, by adding
'my' where appropriate. Michael Fuhr
1 parent9a4fd8f commit06f4a53

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/pl/plperl/expected/plperl.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ SELECT perl_get_field((11,12), 'z');
336336
-- Test return_next
337337
--
338338
CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$
339-
$i = 0;
339+
my$i = 0;
340340
for ("World", "PostgreSQL", "PL/Perl") {
341341
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
342342
}
@@ -354,8 +354,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
354354
-- Test spi_query/spi_fetchrow
355355
--
356356
CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$
357-
$x = spi_query("select 1 as a union select 2 as a");
358-
while (defined ($y = spi_fetchrow($x))) {
357+
my$x = spi_query("select 1 as a union select 2 as a");
358+
while (defined (my$y = spi_fetchrow($x))) {
359359
return_next($y->{a});
360360
}
361361
return;

‎src/pl/plperl/sql/plperl.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ SELECT perl_get_field((11,12), 'z');
240240
--
241241

242242
CREATE OR REPLACEFUNCTIONperl_srf_rn() RETURNS SETOF RECORDAS $$
243-
$i=0;
243+
my$i=0;
244244
for ("World","PostgreSQL","PL/Perl") {
245245
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
246246
}
@@ -253,8 +253,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
253253
--
254254

255255
CREATE OR REPLACEFUNCTIONperl_spi_func() RETURNS SETOFINTEGERAS $$
256-
$x= spi_query("select 1 as a union select 2 as a");
257-
while (defined ($y= spi_fetchrow($x))) {
256+
my$x= spi_query("select 1 as a union select 2 as a");
257+
while (defined (my$y= spi_fetchrow($x))) {
258258
return_next($y->{a});
259259
}
260260
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp