Closed p5pRT closed 8 years ago
The pod documentation (particularly perlre) sometimes says 'lookahead' and sometimes 'look-ahead'. This makes searching harder. A quick survey shows that the form without the hyphen is more frequent:
% grep -ri lookbehind | wc -l 84 % grep -ri look-behind | wc -l 21 % grep -ri lookahead | wc -l 183 % grep -ri look-ahead | wc -l 22 % grep -ri lookaround | wc -l 5 % grep -ri look-around | wc -l 4
FWIW\, the Camel book also prefers the form without hyphen. This patch makes pod documentation always use 'lookahead'\, 'lookbehind' and 'lookaround'. It also changes some comments.
I see that the patch changes some \X anchors\, which is not intentional (both spellings can appear in \X). Let me make a new patch.
The RT System itself - Status changed from 'new' to 'open'
New patch fixing a couple of errors in the original.
On Tue Nov 10 02:48:54 2015\, eda@waniasset.com wrote:
The pod documentation (particularly perlre) sometimes says 'lookahead' and sometimes 'look-ahead'. This makes searching harder. A quick survey shows that the form without the hyphen is more frequent:
% grep -ri lookbehind | wc -l 84 % grep -ri look-behind | wc -l 21 % grep -ri lookahead | wc -l 183 % grep -ri look-ahead | wc -l 22 % grep -ri lookaround | wc -l 5 % grep -ri look-around | wc -l 4
FWIW\, the Camel book also prefers the form without hyphen. This patch makes pod documentation always use 'lookahead'\, 'lookbehind' and 'lookaround'. It also changes some comments.
pod/perlre.pod is pretty consistently using the hyphen versions\, which I prefer.
diff --git a/cpan/Encode/encengine.c b/cpan/Encode/encengine.c ... diff --git a/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm b/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm ... diff --git a/cpan/Text-Tabs/lib/Text/Wrap.pm b/cpan/Text-Tabs/lib/Text/Wrap.pm ... diff --git a/cpan/perlfaq/lib/perlfaq6.pod b/cpan/perlfaq/lib/perlfaq6.pod ...
These would need to go through their CPAN upstreams.
Tony
Here are two patches. One changes consistently to 'lookahead'\, and the other consistently to 'look-ahead'. The p5-porters can apply which of the two they prefer.
FTR\, these were generated with respectively
perl -i -pE 's/(?\<!X\<)(look)-(behind|ahead|around)/$1 . lc $2/gei' `ack -li look- | grep -v cpan/`
perl -i -pE 'next if ($ARGV =~ /[.]c\z/ and not /\AThe/ and not /\bFAIL2?\b/) and /[;{)\,]\s*\z/; s/(?\<!X\<)(?\<!\$)(?\<![a-z])([Ll]ook)((?:[Bb]ehind|[Aa]head|[Aa]round)s?)\b/$1 . "-" . (($1 eq ucfirst $1 and m{ A-Z}g > 1) ? ucfirst $2 : $2)/ge' `ack -li look | grep -v cpan/`
They pass 'make test'.
* Ed Avis via RT \perlbug\-followup@​perl\.org [2015-11-18T11:52:30]
Here are two patches. One changes consistently to 'lookahead'\, and the other consistently to 'look-ahead'. The p5-porters can apply which of the two they prefer.
I plan to apply the "settle on lookahead" patch unless someone has a reasoned objection.
-- rjbs
On Sat Dec 05 18:41:22 2015\, perl.p5p@rjbs.manxome.org wrote:
* Ed Avis via RT \perlbug\-followup@​perl\.org [2015-11-18T11:52:30]
Here are two patches. One changes consistently to 'lookahead'\, and the other consistently to 'look-ahead'. The p5-porters can apply which of the two they prefer.
I plan to apply the "settle on lookahead" patch unless someone has a reasoned objection.
rjbs: You applied a patch in commit f67a500207b5795952c02ea7b3c1af93098433fb. Is this ticket closable?
Thank you very much.
-- James E Keenan (jkeenan@cpan.org)
It is\, so I hereby close it! Thanks.
-- rjbs
@rjbs - Status changed from 'open' to 'resolved'
Shouldn't this be 'pending release' rather than 'resolved'?
Can the patch be merged into the 5.22 maintenance tree?
Just out of curiosity did you do the same thing look-behind and look-around?
Yves
On 9 December 2015 at 11:48\, Ed Avis via RT \perlbug\-followup@​perl\.org wrote:
Shouldn't this be 'pending release' rather than 'resolved'?
Can the patch be merged into the 5.22 maintenance tree?
--- via perlbug: queue: perl5 status: resolved https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126608
-- perl -Mre=debug -e "/just|another|perl|hacker/"
Yes\, the patch does lookahead\, lookbehind\, and lookaround. See above for the perl -i command that was used to generate it.
On 9 December 2015 at 11:59\, Ed Avis via RT \perlbug\-followup@​perl\.org wrote:
Yes\, the patch does lookahead\, lookbehind\, and lookaround. See above for the perl -i command that was used to generate it.
Oh sorry\, I missed that in the big patch. :-)
Thanks! Sorry for contributing to this problem. I am sure at least a few things you fixed were me.
Yves
Migrated from rt.perl.org#126608 (status was 'resolved')
Searchable as RT126608$