In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/31587b3e6fc5a715bd8d06712b4e312147fde836?hp=01f9673fe8388317fdf7fca63774e3bc0dfd58d3>
- Log ----------------------------------------------------------------- commit 31587b3e6fc5a715bd8d06712b4e312147fde836 Author: Abigail <[email protected]> Date: Tue Jan 17 22:54:08 2017 +0100 Avoid deprecation message. File::Glob::glob is deprecated. So, if we test it, we should avoid the warning. M ext/File-Glob/t/basic.t commit 5ad2a0b67cdf1d90b67b991ae8708d3b9d57bad9 Author: Abigail <[email protected]> Date: Tue Jan 17 22:21:29 2017 +0100 Avoid triggering a deprecation warnings. The offending line is put in a block with "no warnings 'deprecated';". The line can go after 5.26, as it'll be fatal in 5.28. M t/re/regex_sets.t commit 29c312f999a2a4506abce379a46670e83c8aa6bf Author: Abigail <[email protected]> Date: Tue Jan 17 22:16:02 2017 +0100 Avoid deprecation warning. Use of an unqualified dump() now gives a deprecation warning. So, change dump into CORE::dump in the tests. M dist/Safe/t/safeops.t M t/base/lex.t ----------------------------------------------------------------------- Summary of changes: dist/Safe/t/safeops.t | 2 +- ext/File-Glob/t/basic.t | 2 +- t/base/lex.t | 2 +- t/re/regex_sets.t | 8 +++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dist/Safe/t/safeops.t b/dist/Safe/t/safeops.t index 9094a00b93..0b696a8149 100644 --- a/dist/Safe/t/safeops.t +++ b/dist/Safe/t/safeops.t @@ -286,7 +286,7 @@ return return last last next next redo redo THIS -dump dump +dump CORE::dump goto goto THERE exit exit 0 open open FOO diff --git a/ext/File-Glob/t/basic.t b/ext/File-Glob/t/basic.t index 1e264a2eb1..f0363cdcdb 100644 --- a/ext/File-Glob/t/basic.t +++ b/ext/File-Glob/t/basic.t @@ -44,7 +44,7 @@ if (opendir(D, ".")) { @correct = grep { !/^\./ } sort readdir(D); closedir D; } -my @a = File::Glob::glob("*", 0); +my @a = do {no warnings 'deprecated'; File::Glob::glob("*", 0);}; @a = sort @a; if (GLOB_ERROR) { fail(GLOB_ERROR); diff --git a/t/base/lex.t b/t/base/lex.t index 87eb0e4a3c..e154aca801 100644 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -360,7 +360,7 @@ print "not " if $@; print "ok $test - listop({$_ => 1} + 1)\n"; $test++; print "# $@" if $@; -for(qw< require goto last next redo dump >) { +for(qw< require goto last next redo CORE::dump >) { eval "sub { $_ foo << 2 }"; print "not " if $@; print "ok ", $test++, " - [perl #105924] $_ WORD << ...\n"; diff --git a/t/re/regex_sets.t b/t/re/regex_sets.t index 6a79f9d692..994d0a28c8 100644 --- a/t/re/regex_sets.t +++ b/t/re/regex_sets.t @@ -165,7 +165,13 @@ for my $char ("Ù ", "Ù¥", "Ù©") { like($@, qr/^Syntax error/, '/(?[(\c]) ]\b/ should be a syntax error'); eval { $_ = '(?[\c[]](])'; qr/$_/ }; like($@, qr/^Syntax error/, '/(?[\c[]](])/ should be a syntax error'); - like("\c#", qr/(?[\c#])/, '\c# should match itself'); + { + # This block needs to go after 5.26, as it will be + # fatal in 5.28. But it's not fatal yet, so we ought + # to test it. + no warnings 'deprecated'; + like("\c#", qr/(?[\c#])/, '\c# should match itself'); + } like("\c[", qr/(?[\c[])/, '\c[ should match itself'); like("\c\ ", qr/(?[\c\])/, '\c\ should match itself'); like("\c]", qr/(?[\c]])/, '\c] should match itself'); -- Perl5 Master Repository
