Skip Menu |
 

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 77489
Status: resolved
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: wyant [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.06
Fixed in: 1.08



Subject: t/13_author_tests*.t noisy under 5.17.0
Download (untitled) / with headers
text/plain 1.2k
The perldoc for 5.17.0 says: Literal unescaped "{" in regular expressions is now deprecated. Every brace character should be either escaped (by a preceding backslash) or part of a construct where it's a metacharacter. This catches likely typos such as "/f{,3}/". It will also allow braces to be used in the future to delimit parameters to metacharacters that currently take no parameters. Under 5.17.0, compilation of the three t/13_author_tests*.t tests results in multiple warnings like the following: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/#\s*test => { <-- HERE TESTS=>.+xt/\*\.t/ at t/13_author_tests.t line 34. The fix appears to be the obvious one, and will be committed as soon as I have created the RT ticket, so that I can reference its number in the commit message. The fix has been tested (with Module::Install::AuthorTests and Module::Install::ExtraTests installed) under both 5.16.0 and 5.17.0, and works both ways -- though in both cases n = 1. The svn diff output is attached for those who do not want to wait for a new release. I have set this "unimportant" because the tests do not, at this point, fail, and because it is a year before the deprecation will hit production code, if it ever does.
Subject: Module-Install.patch
Index: t/13_author_tests.t =================================================================== --- t/13_author_tests.t (revision 15446) +++ t/13_author_tests.t (working copy) @@ -31,7 +31,7 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); ok( kill_dist(), 'kill_dist' ); } @@ -58,9 +58,9 @@ ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; if ( $ENV{RELEASE_TESTING} ) { - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); } else { - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); } ok( kill_dist(), 'kill_dist' ); } Index: t/13_author_tests_ext.t =================================================================== --- t/13_author_tests_ext.t (revision 15446) +++ t/13_author_tests_ext.t (working copy) @@ -34,8 +34,8 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); ok( kill_dist(), 'kill_dist' ); } @@ -63,11 +63,11 @@ ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; if ( $ENV{RELEASE_TESTING} ) { - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); } else { - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); } - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); ok( kill_dist(), 'kill_dist' ); } @@ -95,8 +95,8 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); ok( kill_dist(), 'kill_dist' ); } @@ -126,10 +126,10 @@ ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; if ( $ENV{RELEASE_TESTING} ) { - ok($content =~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); + ok($content =~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has xt/*.t'); } else { - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); } - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t\s+xt\/\*\.t/, 'has no second xt/*.t'); ok( kill_dist(), 'kill_dist' ); } Index: t/13_author_tests_ext2.t =================================================================== --- t/13_author_tests_ext2.t (revision 15446) +++ t/13_author_tests_ext2.t (working copy) @@ -35,7 +35,7 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); my $res = make('test'); ok( $res =~ /Result:\s*PASS/ ); ok( kill_dist(), 'kill_dist' ); @@ -65,7 +65,7 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); my $res = make('test'); ok( $res =~ /Result:\s*PASS/ ); ok( kill_dist(), 'kill_dist' ); @@ -95,7 +95,7 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); my $res = make('test'); ok( $res =~ /Result:\s*PASS/ ); ok( kill_dist(), 'kill_dist' ); @@ -126,7 +126,7 @@ my $content = _read($file); ok($content, 'file is not empty'); diag my ($testline) = $content =~ /^#\s*(test => .+)$/m if $ENV{TEST_VERBOSE}; - ok($content !~ /#\s*test => { TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); + ok($content !~ /#\s*test => \{ TESTS=>.+xt\/\*\.t/, 'has no xt/*.t'); my $res = make('test'); ok( $res =~ /Result:\s*PASS/ ); ok( kill_dist(), 'kill_dist' );
The change was committed as SVN revision 15447.
please close fixed in 1.08
On Tue Mar 25 08:39:29 2014, bowtie wrote: Show quoted text
> please close fixed in 1.08
As you wish! :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.