Commit 8823bc2e authored by Andrew Dunstan's avatar Andrew Dunstan

Use a fatal warning check with what looks like a more portable error message....

Use a fatal warning check with what looks like a more portable error message. Error noticed by Tom and buildfarm member kite.
parent 50a90fac
...@@ -578,7 +578,7 @@ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl; ...@@ -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. ERROR: Can't use string ("foo") as a SCALAR ref while "strict refs" in use at line 1.
CONTEXT: PL/Perl anonymous code block CONTEXT: PL/Perl anonymous code block
-- check that we can "use warnings" (in this case to turn a warn into an error) -- 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" -- yields "ERROR: Useless use of sort in scalar context."
DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl; DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
ERROR: Useless use of length in void context at line 1. ERROR: Useless use of sort in scalar context at line 1.
CONTEXT: PL/Perl anonymous code block CONTEXT: PL/Perl anonymous code block
...@@ -379,6 +379,6 @@ DO $$ use blib; $$ LANGUAGE plperl; ...@@ -379,6 +379,6 @@ DO $$ use blib; $$ LANGUAGE plperl;
DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ 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) -- 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" -- yields "ERROR: Useless use of sort in scalar context."
DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl; DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment