git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50a90fa)
Use a fatal warning check with what looks like a more portable error message. Error...
2010年2月17日 05:32:48 +0000 (05:32 +0000)
2010年2月17日 05:32:48 +0000 (05:32 +0000)

diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
index 0e7c65dc2b0a0f751bca9f08f40783f9a0f15650..b3027f892684e9e3c258a141c308f4950eb564aa 100644 (file)
--- a/src/pl/plperl/expected/plperl.out
+++ b/src/pl/plperl/expected/plperl.out
@@ -578,7 +578,7 @@ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
ERROR: Can't use string ("foo") as a SCALAR ref while "strict refs" in use at line 1.
CONTEXT: PL/Perl anonymous code block
-- check that we can "use warnings" (in this case to turn a warn into an error)
--- yields "ERROR: Useless use of length in void context"
-DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
-ERROR: Useless use of length in void context at line 1.
+-- yields "ERROR: Useless use of sort in scalar context."
+DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
+ERROR: Useless use of sort in scalar context at line 1.
CONTEXT: PL/Perl anonymous code block
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
index 905e9187d408dd090c75c57cebad9126a9c2d7c3..6d4c5c2a85448d10cd2c570d2092e052b046d93a 100644 (file)
--- a/src/pl/plperl/sql/plperl.sql
+++ b/src/pl/plperl/sql/plperl.sql
@@ -379,6 +379,6 @@ DO $$ use blib; $$ LANGUAGE plperl;
DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
-- check that we can "use warnings" (in this case to turn a warn into an error)
--- yields "ERROR: Useless use of length in void context"
-DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
+-- yields "ERROR: Useless use of sort in scalar context."
+DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /