Skip to content

Commit 8823bc2

Browse files
committed
Use a fatal warning check with what looks like a more portable error message. Error noticed by Tom and buildfarm member kite.
1 parent 50a90fa commit 8823bc2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pl/plperl/expected/plperl.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
578578
ERROR: Can't use string ("foo") as a SCALAR ref while "strict refs" in use at line 1.
579579
CONTEXT: PL/Perl anonymous code block
580580
-- check that we can "use warnings" (in this case to turn a warn into an error)
581-
-- yields "ERROR: Useless use of length in void context"
582-
DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
583-
ERROR: Useless use of length in void context at line 1.
581+
-- yields "ERROR: Useless use of sort in scalar context."
582+
DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
583+
ERROR: Useless use of sort in scalar context at line 1.
584584
CONTEXT: PL/Perl anonymous code block

src/pl/plperl/sql/plperl.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,6 @@ DO $$ use blib; $$ LANGUAGE plperl;
379379
DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
380380

381381
-- check that we can "use warnings" (in this case to turn a warn into an error)
382-
-- yields "ERROR: Useless use of length in void context"
383-
DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
382+
-- yields "ERROR: Useless use of sort in scalar context."
383+
DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
384384

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy