Closed p5pRT closed 12 years ago
Message saved in `perlbug.rep'.
ISO-8859-1 and Unicode define the character ' as an unsexed single quote\, and ` as a grave accent. Modern fonts don't show them as a balanced pair of sexed single quotes. We should audit the perl core (C and Perl) to remove the obsolescent use of `'. The GNU project have done this for gcc 4\, IIRC
See http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
Nicholas Clark
On Wed Jun 01 11:23:57 2005\, nicholas wrote:
We should audit the perl core (C and Perl) to remove the obsolescent use of `'.
I have written the attached program\, 36079.pl\, to address the issue raised in this ticket. Please review\, paying particular attention to the directories and files removed from the scope of the program.
When run on the Perl 5.14.2 source code\, I get a list of files with lines *possibly* needing correction. See attached 'mismatched.txt'.
If the code in the program is deemed reasonable\, I and others could proceed to do the corrections.
Thank you very much. Jim Keenan
Copying:
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
commands you use may be called something other than `show w' and `show
program `Gnomovision' (a program to direct compilers to make passes
Cross/cflags-cross-arm:
set `echo "$* " | sed -e 's/\.[oc] / /g' -e "s/\.${CROSS_NAME}o / /g" -e 's/\.obj / /g' -e "s/\\$obj_ext / /g"`
ccflags=`echo $ccflags|sed 's/$f/ /'`
Cross/Makefile-cross-SH:
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl\,+s -Wl\,+b$archlibexp/CORE -lperl"
ldlibpth=`echo $ldlibpth | sed 's/:*$//'`
*" "*) ldlibpth=`echo $ldlibpth|sed 's/ /\\\\ /g'` ;;
base=`echo "$f" | sed 's/.*\///'`
base=`echo "$f" | sed 's/.*\///'`
base=`echo "$f" | sed 's/.*\///'`
CCCMD = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$@\`
CCCMDSRC = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$\<\`
CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
Cross/Makefile.SH.patch:
`echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
$(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
generate_uudmap.c:
= "`!\"#$%&'()*+\,-./0123456789:;\<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
* Because ' ' and '`' map to the same value\,
gv.c:
case '`': /* $` */
case '`':
h2pl/tcbreak:
printf "you gave me `%s'\, which is 0x%02x\n"\, $c\, ord($c);
h2pl/tcbreak2:
printf "you gave me `%s'\, which is 0x%02x\n"\, $c\, ord($c);
INSTALL:
util.c: In function `Perl_form':
If "make install" just says "`install' is up to date" or something
installman:
warn("Cannot rename to `$to.$i': $!")\, return 0
installperl:
`./$^X -pibak -e 's{$pwd\/libperl.x}{$archlibexp/CORE/libperl.x}' lib/Config.pm`;
warn("Cannot rename to `$to.$i': $!")\, return 0
l1_char_class_tab.h:
/* U+60 '`' */ _CC_GRAPH_A|_CC_GRAPH_L1|_CC_PRINT_A|_CC_PRINT_L1|_CC_PUNCT_A|_CC_PUNCT_L1\,
lib/charnames.pm:
carp("`use charnames' needs explicit imports list");
lib/DB.pm:
$f = "file `$f'" unless $f eq '-e';
lib/dumpvar.pl:
print "Unknown value for `unctrl'.\n";
lib/File/Basename.pm:
# The basename utility deletes any prefix ending with the last slash `/'
lib/Getopt/Std.pm:
See ``perldoc $p'' about \$$p\::STANDARD_HELP_VERSION.]
lib/h2xs.t:
# do `$^X -e 'warn "Writing h2xst"' 2>&1`; duplicity.
lib/overload.pm:
#print STDERR "Setting `$ {'package'}::\cO$_' to \\&`$sub'.\n";
warnings::warnif ("`$_[0]' is not an overloadable type");
warnings::warn ("`$_[1]' is not a code reference");
`C\
pod/perldebug.pod:
$ = main::infested called from file `Ambulation.pm' line 10
@ = Ambulation::legs(1\, 2\, 3\, 4) called from file `camel_flea' line 7
$ = main::pests('bactrian'\, 4) called from file `camel_flea' line 4
Will stop on load of `f:/perllib/lib/Carp.pm'.
pod/perldiag.pod:
=item `%s' is not a code reference
=item `%s' is not an overloadable type
(W ambiguous) You said something like `@foo' in a double-quoted string
=item syntax error at line %d: `%s' unexpected
pod/perlebcdic.pod:
$ascii_data = `echo '$ebcdic_data'| iconv -f IBM-1047 -t ISO8859-1`
$ebcdic_data = `echo '$ascii_data'| iconv -f ISO8859-1 -t IBM-1047`
M``$"`P0%!@\<("0H+#`T.#Q`1$A\,4%187&!D:&QP='A\@(2(C)"4F)R@I*BLL
my @ds_records = `cat //'HLQ.DSNAME'`;
pod/perlfaq3.pod:
Download the ExtUtils::Embed kit from CPAN and run `make test'. If
pod/perlfaq6.pod:
while ( /(\b[^\W_\d][\w'-]+\b)/g ) { # misses "`sheep'"
pod/perlfaq8.pod:
print STDERR "$0: cu printed `$_' instead of `Connected'\n";
@ok = `grep @opts '$search_string' @filenames`;
pod/perlform.pod:
print "Wow\, I just stored `$^A' in the accumulator!\n";
pod/perlgit.pod:
# version 96a8704c. Make sure to comment out `git checkout makedepend.SH'
pod/perlgpl.pod:
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
commands you use may be called something other than `show w' and `show
program `Gnomovision' (a program to direct compilers to make passes
pod/perlhack.pod:
% perlbug -s '[PATCH] `git log --pretty=format:%s HEAD^1..HEAD`' -f 0001-*.patch
pod/perlipc.pod:
print "Parent Pid $$ just read this: `$line'\n";
print "Child Pid $$ just read this: `$line'\n";
print "Parent Pid $$ just read this: `$line'\n";
pod/perlreapi.pod:
# `paren' will be `1' and `value' will be `ee'
pod/perlreftut.pod:
`references'\, and using references is the key to managing complicated\,
`autovivification'--bringing things to life automatically. Perl saw
pod/perlretut.pod:
Compiling REx `a*b+c'
floating `bc' at 0..2147483647 (checking floating) minlen 2
Guessing start of match\, REx `a*b+c' against `abc'...
Found floating substr `bc' at offset 1...
Matching REx `a*b+c' against `abc'
Freeing REx: `a*b+c'
Compiling REx `a*b+c'
floating `bc' at 0..2147483647 (checking floating) minlen 2
Guessing start of match\, REx `a*b+c' against `abc'...
Found floating substr `bc' at offset 1...
Matching REx `a*b+c' against `abc'
Freeing REx: `a*b+c'
pod/perlrun.pod:
`extproc' handling).
pod/perlsec.pod:
$arg\, `true`; # Insecure (although it isn't really)
pod/perlsyn.pod:
# the `#' on the previous line must be the first char on line
pod/perltoot.pod:
croak "Can't access `$name' field in class $type";
Porting/check-cpan-pollution:
print `$cmd`; # make sure git knows this isn't a terminal
Porting/epigraphs.pod:
`How the creatures order one about\, and make one repeat lessons!' thought Alice;
`I might as well be at school at once.' However\, she got up\, and began to repeat
`That's different from what I used to say when I was a child\,' said the Gryphon.
`Well\, I never heard it before\,' said the Mock Turtle; `but it sounds uncommon
`I should like to have it explained\,' said the Mock Turtle.
`She can't explain it\,' said the Gryphon hastily. `Go on with the next verse.'
`But about his toes?' the Mock Turtle persisted. `How could he turn them out
`It's the first position in dancing.' Alice said; but was dreadfully puzzled by
`cells' in a big `electronic brain.' "
`What have I got in my pocket?' he said aloud. He was talking to
`Not fair! not fair!' he hissed. `It isn't fair\, my precious\, is it\,
stuck to his question\, `What have I got in my pocket?' he said
`S-s-s-s-s\,' hissed Gollum. `It must give us three guesseses\,
Porting/fixvars:
if (/^(.*):(\d+):\s+\`(\w+)'\s+undeclared/ && -f $1 )
Porting/genlog:
warn "Arguments must be change numbers\, ignoring `$_'\n";
Porting/Glossary:
programs (e.g. I_UNISTD) are already described in config_h.SH. [`configpm'
Porting/make_snapshot.pl:
($sha1\, $abbr\,$tstamp)= split /\s+/\, `git log --pretty='format:%H %h %ct' -1 $sha1`
if `git log --pretty='format:%H' $b | grep $sha1`;
Porting/testall.atom:
the_t=`echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t uni/*.t pod/*.t x2p/*.t; find ../ext ../lib -name '*.t' -print`
t/*) t=`echo $t|sed 's:^t/::'` ;;
case "`head -1 $t|egrep -e '^#.* -.*T'`" in
case "`head -1 $t|egrep -e '^#.* -.*t'`" in
README.os2:
`cmd /c 'find "pattern" file'`
/* XXXX Fill `me' with new value */
README.qnx:
dist/Cwd/Cwd.t will complain if `pwd` and cwd don't give
README.solaris:
gcc: file path prefix `/usr/ccs/bin/' never used
README.tru64:
Configure[2437]: Syntax error at line 1 : `config.sh' is not expected.
sv.h:
mg.c: In function `Perl_magic_get':
t/base/lex.t:
# $^FOO is always global; it doesn't make sense to `my' it.
t/base/term.t:
$x = `$^X -le "print 'hi there'"`;
t/comp/proto.t:
print "# CORE:Foo => ($p)\, \$@ => `$@'\nnot "
t/io/fs.t:
`/bin/rm -rf a b c x` if -x '/bin/rm';
t/japh/abigail.t:
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^\,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{]\,\,\,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"'\,.| |d)&&$llama."\n");
t/lib/cygwin.t:
chomp(my $prefix2 = `df | grep -i '^c: ' | cut -d% -f2 | xargs`);
t/lib/h2ph.h:
* Test #if\, #elif\, #else\, #endif\, #warn and #error\, and `!'
* Also test whitespace between the `#' and the command
* circumstances - for example\, `#include_next \<limits.h>' on a Linux system
* with `use lib qw(/opt/perl5/lib/site_perl/i586-linux/linux);' or whatever
t/lib/strict/vars:
# now that the `@i should be written as \@i' failure does not occur
t/lib/warnings/op:
Package `%s' not found (did you use the incorrect case?)
toke.c:
if (*s == '\'' || *s == '"' || *s == '`') {
case '`':
if (*peek == '`' || *peek == '\'' || *peek =='"') {
else if (term == '`') {
t/op/alarm.t:
ok($foo eq "foo"\, '[perl #33928] chomp() fails after alarm()\, `sleep`');
t/op/exec.t:
my $echo_out = `$Perl -e "print 'ok'" | $Perl -le "print \ command\, either the `g' flag and an n-th occurrence flag\, or
`1' through `9' are permitted.
=item illegal option `%s'
The BRE and substitution may not be delimited with `\' or newline.
=item invalid address after `\,'
=item invalid repeat clause `\{%s\}'
=item malformed `y' command argument
=item maximum less than minimum in `\{%s\}'
=item `\' not valid as delimiter in `y' command
=item `s' command requires argument
=item start of unterminated `{'
=item string lengths in `y' command differ
=item undefined label `%s'
=item unexpected `}'
=item unknown command `%s'
=item unterminated `['
=item unterminated `\('
=item `\{' without closing `\}'
=item `\)' without preceding `\('
=item `y' command requires argument
The B\
The RT System itself - Status changed from 'new' to 'open'
On Sat\, Nov 19\, 2011 at 08:51:55AM -0800\, James E Keenan via RT wrote:
On Wed Jun 01 11:23:57 2005\, nicholas wrote:
We should audit the perl core (C and Perl) to remove the obsolescent use of `'.
I have written the attached program\, 36079.pl\, to address the issue raised in this ticket. Please review\, paying particular attention to the directories and files removed from the scope of the program.
When run on the Perl 5.14.2 source code\, I get a list of files with lines *possibly* needing correction. See attached 'mismatched.txt'.
There seems to be a significant number of false positives. How about this regex instead?
/(?:^|(?\<!=)\s|[\"\`\(\[])`[^`']*'/
That still finds some false positives\, but it's an improvement anyway.
Ronald
On Sat Nov 19 08:51:55 2011\, jkeenan wrote:
On Wed Jun 01 11:23:57 2005\, nicholas wrote:
We should audit the perl core (C and Perl) to remove the obsolescent use of `'.
I have written the attached program\, 36079.pl\, to address the issue raised in this ticket. Please review\, paying particular attention to the directories and files removed from the scope of the program.
When run on the Perl 5.14.2 source code\, I get a list of files with lines *possibly* needing correction. See attached 'mismatched.txt'.
If the code in the program is deemed reasonable\, I and others could proceed to do the corrections.
Thank you for volunteering.
Please note that dist/ and ext/ are maintained in core.
--
Father Chrysostomos
On Sat Nov 19 10:52:27 2011\, sprout wrote:
Thank you for volunteering.
Please note that dist/ and ext/ are maintained in core.
Here is a patch that covers 69 files; there are more to be done.
With this patch\, 'make test' will PASS all tests *except* t/porting/cmp_version.t. I don't yet understand that test well enough to know what is going wrong.
I could also supply this as approx. 17 files created by git-format-patch. Let me know what format works best for you.
Please review.
Thank you very much. Jim Keenan
On Sat Nov 19 19:29:17 2011\, jkeenan wrote:
On Sat Nov 19 10:52:27 2011\, sprout wrote:
Thank you for volunteering.
Please note that dist/ and ext/ are maintained in core.
Here is a patch that covers 69 files; there are more to be done.
With this patch\, 'make test' will PASS all tests *except* t/porting/cmp_version.t. I don't yet understand that test well enough to know what is going wrong.
If the version number of a module hasnāt changed since the last release\, any change necessitates a version bump.
I could also supply this as approx. 17 files created by git-format-patch. Let me know what format works best for you.
git-format-patch files are generally easier to apply.
Please review.
I havenāt looked through it thoroughly\, but I noticed a few things:
I noticed one place where `'' (already confusing) has become ''' (definitely confusing) and at least one place where ``...'' has become ''...'' instead of "...".
This change is erroneous:
@@ -3913\,7 +3913\,7 @@ sub dq { sub pp_backtick { my $self = shift; my($op\, $cx) = @_; - # skip pushmark if it exists (readpipe() vs ``) + # skip pushmark if it exists (readpipe() vs '`) my $child = $op->first->sibling->isa('B::NULL') ? $op->first : $op->first->sibling; if ($self->pure_string($child)) {
I wonder: why not use ā and ā for comments? Almost all the source is in UTF-8 these days. (Iām not saying to go ahead and use them. Give others time to chime in. Also\, test names and error messages should probably stick to ASCII most of the time.)
--
Father Chrysostomos
On Sat Nov 19 22:07:57 2011\, sprout wrote:
On Sat Nov 19 19:29:17 2011\, jkeenan wrote:
Here is a patch that covers 69 files; there are more to be done.
The patches attached replace the first batch and complete (for all practical purposes) the process.
If the version number of a module hasnāt changed since the last release\, any change necessitates a version bump.
Done.
git-format-patch files are generally easier to apply.
Supplied.
I noticed one place where `'' (already confusing) has become ''' (definitely confusing) and at least one place where ``...'' has become ''...'' instead of "...".
Agreed; I've tried to rationalize this as much as possible.
This change is erroneous:
@@ -3913\,7 +3913\,7 @@ sub dq { sub pp_backtick { my $self = shift; my($op\, $cx) = @_; - # skip pushmark if it exists (readpipe() vs ``) + # skip pushmark if it exists (readpipe() vs '`) my $child = $op->first->sibling->isa('B::NULL') ? $op->first : $op->first->sibling; if ($self->pure_string($child)) {
Fixed.
I wonder: why not use ā and ā for comments? Almost all the source is in UTF-8 these days. (Iām not saying to go ahead and use them. Give others time to chime in. Also\, test names and error messages should probably stick to ASCII most of the time.)
Umm\, that sounds like an invitation to bikeshedding. Can we rule that out-of-scope for this RT? This ticket touches many files\, so let's not complicate the review process unnecessarily.
Thank you very much. Jim Keenan
or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction. BSummary of debugger commands. @@ -7454,7 +7454,7 @@ B<$doccmd> I Runs the external doc viewer B<$doccmd> command on the named Perl I , or on B<$doccmd> itself if omitted. Set B<\$DB::doccmd> to change viewer. -Type `|h h' for a paged display if this was too hard to read. +Type '|h h' for a paged display if this was too hard to read. "; # Fix balance of vi % matching: }}}} @@ -7527,7 +7527,7 @@ B [I ] [I ] B I [I ] Set breakpoint at first line of subroutine. B I<\$var> Set breakpoint at first line of subroutine referenced by I<\$var>. -B B I Set breakpoint on `require'ing the given file. +B B I Set breakpoint on 'require'ing the given file. B B I [I ] Set breakpoint at first line of subroutine after it is compiled. @@ -7620,7 +7620,7 @@ B [I B<=>I ] [I =B<\">I B<\">] ... During startup options are initialized from \$ENV{PERLDB_OPTS}. You can put additional initialization options I , I , I , I , and I there (or use - `B ' after you set them). + 'B ' after you set them). B or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction. B[I ] Get help [on a specific debugger command], enter B<|h> to page. @@ -7629,7 +7629,7 @@ B<$doccmd> I Runs the external doc viewer B<$doccmd> command on the named Perl I , or on B<$doccmd> itself if omitted. Set B<\$DB::doccmd> to change viewer. -Type `|h' for a paged display if this was too hard to read. +Type '|h' for a paged display if this was too hard to read. "; # Fix balance of vi % matching: }}}} @@ -8889,7 +8889,7 @@ Say we're done. sub end_report { local $\ = ''; - print $OUT "Use `q' to quit or `R' to restart. `h q' for details.\n"; + print $OUT "Use 'q' to quit or 'R' to restart. 'h q' for details.\n"; } =head2 clean_ENV @@ -9599,7 +9599,7 @@ sub cmd_prepost { elsif ( $cmd =~ /^\{/o ) { if ( $cmd =~ /^\{.*\}$/o && unbalanced( substr( $cmd, 1 ) ) ) { print $OUT -"$cmd is now a debugger command\nuse `;$cmd' if you mean Perl code\n"; +"$cmd is now a debugger command\nuse ';$cmd' if you mean Perl code\n"; } # Properly balanced. Pre-prompt debugger actions. @@ -9676,7 +9676,7 @@ the C block documentation for more details. package DB::fake; sub at_exit { - "Debugged program terminated. Use `q' to quit or `R' to restart."; + "Debugged program terminated. Use 'q' to quit or 'R' to restart."; } package DB; # Do not trace this 1; below! -- 1.6.3.2 ```
From 90b297c8805809d3527c0c5711d981771e9ace85 Mon Sep 17 00:00:00 2001 From: jkeenan \jkeenan@​cpan\.org Date: Sun\, 20 Nov 2011 08:33:12 -0500 Subject: [PATCH 19/23] [RT #36079] Where sensible\, replace consecutive single quotation marks with a double quotation mark.
--- dist/B-Deparse/Deparse.pm | 40 ++++++++++++++++++++-------------------- dist/Cwd/Cwd.xs | 2 +- ext/File-Glob/Glob.pm | 2 +- ext/File-Glob/bsd_glob.c | 2 +- ext/SDBM_File/sdbm/README | 26 +++++++++++++------------- ext/SDBM_File/sdbm/readme.ms | 18 +++++++++--------- ext/Socket/Socket.xs | 2 +- 7 files changed\, 46 insertions(+)\, 46 deletions(-)
This particular patch seems to contain unnecessary changes in indentation.
Also\, this change in dist/B-Deparse/Deparse.pm is not correct:
- for $delim ('/'\, '"'\, '#') { # note no ''' -- s''' is special + for $delim ('/'\, '"'\, '#') { # note no "'' -- s''" is special
It should be: for $delim ('/'\, '"'\, '#') { # note no "'" -- s''' is special
Ronald
Also\, this change in dist/B-Deparse/Deparse.pm is not correct:
- for $delim ('/'\, '"'\, '#') { # note no ''' -- s''' is special + for $delim ('/'\, '"'\, '#') { # note no "'' -- s''" is special
It should be: for $delim ('/'\, '"'\, '#') { # note no "'" -- s''' is special
*Very* well-spotted!
--tom
On Sun Nov 20 15:21:21 2011\, tom christiansen wrote:
Also\, this change in dist/B-Deparse/Deparse.pm is not correct:
- for $delim ('/'\, '"'\, '#') { # note no ''' -- s''' is special + for $delim ('/'\, '"'\, '#') { # note no "'' -- s''" is special
It should be: for $delim ('/'\, '"'\, '#') { # note no "'" -- s''' is special
*Very* well-spotted!
But what colour are the spots?
--
Father Chrysostomos
On Sun Nov 20 08:30:32 2011\, jkeenan wrote:
On Sat Nov 19 22:07:57 2011\, sprout wrote:
On Sat Nov 19 19:29:17 2011\, jkeenan wrote:
Here is a patch that covers 69 files; there are more to be done.
The patches attached replace the first batch and complete (for all practical purposes) the process.
If the version number of a module hasnāt changed since the last release\, any change necessitates a version bump.
Done.
git-format-patch files are generally easier to apply.
Supplied.
Thank you. Applied and merged as f6525ddc42.
I didnāt notice that you had said āDoneā above\, and I got test failures half way through and bumped the version numbers myself\, before I realised one of your patches did it\, so it doesnāt have you name on it. (I was basically running tests continuously while reviewing and applying each patch.)
--
Father Chrysostomos
@cpansprout - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#36079 (status was 'resolved')
Searchable as RT36079$