Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parse-ErrorString-Perl CPAN distribution.

Report information
The Basics
Id: 87458
Status: resolved
Priority: 0/
Queue: Parse-ErrorString-Perl

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

Bug Information
Severity: Important
Broken in: 0.15
Fixed in: (no value)



Subject: this has become very noisey of late, had a look around to no avail :(
Download (untitled) / with headers
text/plain 11.5k
kevin@billy:~/GitHub/Travis-P-ES-P$ cpan -t Parse::ErrorString::Perl CPAN: CPAN::SQLite loaded ok (v0.203) CPAN: LWP::UserAgent loaded ok (v6.05) Fetching with LWP: http://www.cpan.org/authors/01mailrc.txt.gz CPAN: YAML::XS loaded ok (v0.41) Fetching with LWP: http://www.cpan.org/modules/02packages.details.txt.gz Fetching with LWP: http://www.cpan.org/modules/03modlist.data.gz Database was generated on Sun, 28 Jul 2013 17:40:49 GMT Updating database file ... Done! CPAN: Module::CoreList loaded ok (v2.92) Running test for module 'Parse::ErrorString::Perl' Running make for A/AZ/AZAWAWI/Parse-ErrorString-Perl-0.15.tar.gz CPAN: Digest::SHA loaded ok (v5.85) CPAN: Compress::Zlib loaded ok (v2.061) Checksum for /home/kevin/.cpan/sources/authors/id/A/AZ/AZAWAWI/Parse-ErrorString-Perl-0.15.tar.gz ok CPAN: File::Temp loaded ok (v0.2301) CPAN: Parse::CPAN::Meta loaded ok (v1.4405) CPAN: CPAN::Meta loaded ok (v2.131560) CPAN.pm: Building A/AZ/AZAWAWI/Parse-ErrorString-Perl-0.15.tar.gz CPAN: CPAN::Reporter loaded ok (v1.2010) Checking if your kit is complete... Looks good Writing Makefile for Parse::ErrorString::Perl Writing MYMETA.yml and MYMETA.json (/home/kevin/perl5/perlbrew/perls/perl-5.18.0/bin/perl Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. cp lib/Parse/ErrorString/Perl.pm blib/lib/Parse/ErrorString/Perl.pm cp lib/Parse/ErrorString/Perl/ErrorItem.pm blib/lib/Parse/ErrorString/Perl/ErrorItem.pm cp lib/Parse/ErrorString/Perl/StackItem.pm blib/lib/Parse/ErrorString/Perl/StackItem.pm cp bin/check_perldiag blib/script/check_perldiag /home/kevin/perl5/perlbrew/perls/perl-5.18.0/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/check_perldiag Manifying blib/man1/check_perldiag.1 Manifying blib/man3/Parse::ErrorString::Perl::ErrorItem.3 Manifying blib/man3/Parse::ErrorString::Perl::StackItem.3 Manifying blib/man3/Parse::ErrorString::Perl.3 (/usr/bin/make exited with 0) CPAN::Reporter: make result is 'pass', No errors. AZAWAWI/Parse-ErrorString-Perl-0.15.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /home/kevin/perl5/perlbrew/perls/perl-5.18.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-compile.t ............. ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 140. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 183. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 183. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 206. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 332. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 414. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 878. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 982. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1360. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1692. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1709. t/01-errors.t .............. ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 140. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 200. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 200. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 333. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 402. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 863. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 963. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1347. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1703. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1704. t/02-diagnostics.t ......... ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 140. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 191. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 191. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 200. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 328. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 402. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 889. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 968. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1340. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1706. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1707. t/03-split_diagnostics.t ... ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 140. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 191. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 319. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 417. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 871. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 990. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 1357. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 1691. Useless use of '\'; doesn't escape metacharacter '{' at (eval 9) line 1705. t/04-perldiag.t ............ ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 137. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 194. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 203. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 203. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 319. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 408. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 862. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 951. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1343. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1686. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1716. t/05-stacktrace.t .......... ok Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 6. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 9. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 52. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 61. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 64. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 95. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 143. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 184. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 197. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 206. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 206. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 319. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 402. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 878. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 976. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1347. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1681. Useless use of '\'; doesn't escape metacharacter '{' at (eval 8) line 1712. t/06-short_filename.t ...... ok t/10-check_perldiag.t ...... ok t/release-check-changes.t .. skipped: these tests are for release candidate testing t/release-eol.t ............ skipped: these tests are for release candidate testing t/release-pod-syntax.t ..... skipped: these tests are for release candidate testing All tests successful. Files=11, Tests=94, 7 wallclock secs ( 0.09 usr 0.03 sys + 4.92 cusr 0.15 csys = 5.19 CPU) Result: PASS (/usr/bin/make test exited with 0) CPAN::Reporter: Test result is 'pass', All tests successful. CPAN::Reporter: preparing a CPAN Testers report for Parse-ErrorString-Perl-0.15 CPAN::Reporter: this appears to be a duplicate report for the test phase: PASS Parse-ErrorString-Perl-0.15 i686-linux-thread-multi 3.5.0-28-generic Test report will not be sent. AZAWAWI/Parse-ErrorString-Perl-0.15.tar.gz /usr/bin/make test -- OK
RT-Send-CC: public [...] khwilliamson.com
Download (untitled) / with headers
text/plain 172b
For what it's worth, this warning was introduced in bleadperl commit 4d68ffa0f7f345bc1ae6751744518ba4bc3859bd. Karl, does this case shed some new light on the deprecation?
Subject: Re: [rt.cpan.org #87458] this has become very noisey of late, had a look around to no avail :(
Date: Wed, 31 Jul 2013 13:57:10 -0600
To: bug-Parse-ErrorString-Perl [...] rt.cpan.org
From: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 1.9k
On 07/30/2013 09:29 PM, Andreas Koenig via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87458 > > > For what it's worth, this warning was introduced in bleadperl commit 4d68ffa0f7f345bc1ae6751744518ba4bc3859bd. > > Karl, does this case shed some new light on the deprecation? >
Thank you for bringing this to my attention. It exposes a bug in the deprecation code. The message should not be raised in these tests. I will soon fix blead. You may additionally want to apply the attached patch, which causes the warnings to go away in 5.18.0 forwards, and protects agains gotchas using {} that are explained below. It simply uses <> instead of {} for the regex delimiters in the two regexes that were exhibiting the problem. The deprecation is trying to solve behaviors like this (as given in the commit message for 4d68ff): m{foo\{1,3\}} The backslashes do not turn the interior braces into literal characters, so this matches "f", "o" followed by one to three more occurrences of "o", which is unlikely to be what was intended, which could have been achieved more simply by m{foo{1,3}} The problem that prompted this ticket is that it was warning on something like m{\\x\{ff\}} It was treating it as m{\x\{ff\{} It did not realize that the doubled backslash \ before the 'x' caused the x to not be the beginning of an escape sequence, hence the left brace was not a metacharacter which was uselessly being escaped. This shows the potential danger of using {}, (), and [] as pattern delimiters when they can also appear inside the pattern as a literal. The code in this module appears to be trying to cause arbitrary input strings to be always literal, by escaping them with \Q. That doesn't work in patterns delimited by [], {}, and (). If the input was "foo{1,3}", for example, this code would not have worked. Starting in 5.18, it warns at least. Thus it is better to use <>, which are not metacharacters.
Download parse.patch
text/x-diff 595b

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #87458] this has become very noisey of late, had a look around to no avail :(
Date: Wed, 31 Jul 2013 21:18:28 +0100
To: bug-Parse-ErrorString-Perl [...] rt.cpan.org
From: kevin dawson <kevin [...] dawson10.plus.com>
Download (untitled) / with headers
text/plain 2.2k
On 2013-07-31 20:57, karl williamson via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87458 > > > On 07/30/2013 09:29 PM, Andreas Koenig via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=87458 > >> >> For what it's worth, this warning was introduced in bleadperl commit 4d68ffa0f7f345bc1ae6751744518ba4bc3859bd. >> >> Karl, does this case shed some new light on the deprecation? >>
> Thank you for bringing this to my attention. It exposes a bug in the > deprecation code. The message should not be raised in these tests. I > will soon fix blead. You may additionally want to apply the attached > patch, which causes the warnings to go away in 5.18.0 forwards, and > protects agains gotchas using {} that are explained below. It simply > uses <> instead of {} for the regex delimiters in the two regexes that > were exhibiting the problem. > > The deprecation is trying to solve behaviors like this (as given in the > commit message for 4d68ff): > > m{foo\{1,3\}} > > The backslashes do not turn the interior braces into literal characters, > so this matches "f", "o" followed by one to three more occurrences of > "o", which is unlikely to be what was intended, which could have been > achieved more simply by > > m{foo{1,3}} > > The problem that prompted this ticket is that it was warning on > something like > > m{\\x\{ff\}} > > It was treating it as > > m{\x\{ff\{} > > It did not realize that the doubled backslash \ before the 'x' caused > the x to not be the beginning of an escape sequence, hence the left > brace was not a metacharacter which was uselessly being escaped. > > This shows the potential danger of using {}, (), and [] as pattern > delimiters when they can also appear inside the pattern as a literal. > The code in this module appears to be trying to cause arbitrary input > strings to be always literal, by escaping them with \Q. That doesn't > work in patterns delimited by [], {}, and (). If the input was > "foo{1,3}", for example, this code would not have worked. Starting in > 5.18, it warns at least. Thus it is better to use <>, which are not > metacharacters. >
karl many thanks for the info, can you still use: s/...// where can I find a list of all the undesirable meta-characters that will cause the new noise please. regards kevin
Download (untitled) / with headers
text/plain 196b
The only ones not to use are {} [] () That leaves <> as the only mirrored delimiter pair that is safe to use. Things that are the same delimiter at the beginning and end, such as // are unaffected
Subject: Re: [rt.cpan.org #87458] this has become very noisey of late, had a look around to no avail :(
Date: Thu, 01 Aug 2013 00:14:34 +0100
To: bug-Parse-ErrorString-Perl [...] rt.cpan.org
From: kevin dawson <kevin [...] dawson10.plus.com>
Download (untitled) / with headers
text/plain 339b
On 2013-07-31 21:57, Karl Williamson via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87458 > > > The only ones not to use are {} [] () > That leaves <> as the only mirrored delimiter pair that is safe to use. > Things that are the same delimiter at the beginning and end, such as // are unaffected >
thanks for that karl
Download (untitled) / with headers
text/plain 1.9k
Now fixed in blead by 70502ce06ac10e23f295f974e36317322f791adb. Here is its commit message: From: Karl Williamson <public@khwilliamson.com> Date: Wed, 31 Jul 2013 15:05:43 -0600 Subject: [PATCH 3/3] PATCH: [perl #119101] Extraneous warnings in Parse::ErrorString::Perl (Since 5.18.0) This is from https://rt.cpan.org/Ticket/Display.html?id=87458. Working on this ticket caused me to be more certain of the advisability of the deprecation message that was added in v5.18.0, and which was inappropriately being raised in the test suite for this module. The message notes that escaping the metacharacter '{', '[', or '(') doesn't actually do anything in a pattern whose delimiters are {} [] or () respectively. The code in question looked something like my $pat = "m{\Q$foo}"; ... eval "$bar =~ $pat"; where $foo comes from somewhere else and contained something like \x{61}. The message should not be raised because the \Q changes that to \\x\{61\}, and so the \x loses its special meaning as well, and the left brace is not a metacharacter in this context. The solution is to look at all the backslashes before the 'x' and only raise the message if there are an odd number of them. But, if $foo had been something like "bar{3}", the \Q would have transformed that into "bar\{3\}. In the code above, this matches "b" followed by "a" followed by 3 "r"s. Similarly for [] and (). my $foo = "(abc)"; my $pat = "m(\Q$foo)"; ... eval "$bar =~ $pat"; will not match the parens in $foo literally, but treat them as marking a group. The bottom line is that currently you cannot rely on \Q to properly quote in a regex pattern in which the delimiters are mirrored metacharacters. The only current safe mirrored delimiters are <>, which are not metacharacters. Starting in 5.18.0, there is a default-on message that catches this. Starting with this commit, certain false positives have been removed, and I know of none other.
Download (untitled) / with headers
text/plain 159b
Fixed in http://padre.perlide.org/trac/changeset/19774. Next release will be uploaded soon. Sorry for being very late on this one. Better be late than never :)
Fixed. Thanks Karl. Thanks Kevin


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.