From: Karl Williamson Date: Sun, 16 May 2010 12:56:01 +0000 (-0600) Subject: Don't require doubled backslashes in perldiag.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a68bf9d410f9046c46490523fe5d75c93632a5d;p=p5sagit%2Fp5-mst-13.2.git Don't require doubled backslashes in perldiag.pod Prior to this patch, messages in perldiag.pod had to have \\ instead of the correct single backslash in order for diag.t to not complain. --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 3fd7ed8..adeb5fb 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1211,7 +1211,7 @@ references can be weakened. with an assignment operator, which implies modifying the value itself. Perhaps you need to copy the value to a temporary, and repeat that. -=item Character following "\\c" must be ASCII +=item Character following "\c" must be ASCII (F) In C<\cI>, I must be an ASCII character. @@ -1462,7 +1462,7 @@ there are neither package declarations nor a C<$VERSION>. long for Perl to handle. You have to be seriously twisted to write code that triggers this error. -=item Deprecated character in \\N{...}; marked by <-- HERE in \\N{%s<-- HERE %s +=item Deprecated character in \N{...}; marked by <-- HERE in \N{%s<-- HERE %s (D deprecated) Just about anything is legal for the C<...> in C<\N{...}>. But starting in 5.12, non-reasonable ones that don't look like names are @@ -2528,7 +2528,7 @@ can vary from one line to the next. (F) Missing right brace in C<\x{...}>, C<\p{...}>, C<\P{...}>, or C<\N{...}>. -=item Missing right brace on \\N{} or unescaped left brace after \\N +=item Missing right brace on \N{} or unescaped left brace after \N (F) C<\N> has two meanings. @@ -2640,13 +2640,13 @@ that yet. sense to try to declare one with a package qualifier on the front. Use local() if you want to localize a package variable. -=item \\N in a character class must be a named character: \\N{...} +=item \N in a character class must be a named character: \N{...} (F) The new (5.12) meaning of C<\N> as C<[^\n]> is not valid in a bracketed character class, for the same reason that C<.> in a character class loses its specialness: it matches almost everything, which is probably not what you want. -=item \\N{NAME} must be resolved by the lexer +=item \N{NAME} must be resolved by the lexer (F) When compiling a regex pattern, an unresolved named character or sequence was encountered. This can happen in any of several ways that bypass the lexer, @@ -2688,7 +2688,7 @@ NOTE: This warning detects symbols that have been used only once so $c, @c, the same; if a program uses $c only once but also uses any of the others it will not trigger this warning. -=item Invalid hexadecimal number in \\N{U+...} +=item Invalid hexadecimal number in \N{U+...} (F) The character constant represented by C<...> is not a valid hexadecimal number. Either it is empty, or you tried to use a character other than 0 - 9 @@ -3948,7 +3948,7 @@ where the problem was discovered. See L. <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Sequence \\%s... not terminated in regex; marked by <-- HERE in m/%s/ +=item Sequence \%s... not terminated in regex; marked by <-- HERE in m/%s/ (F) The regular expression expects a mandatory argument following the escape sequence and this has been omitted or incorrectly written. @@ -4617,7 +4617,7 @@ subroutine. in your Perl script (or eval) near the specified column. Perhaps you tried to run a compressed script, a binary program, or a directory as a Perl program. -=item Unrecognized escape \\%c in character class passed through in regex; marked by <-- HERE in m/%s/ +=item Unrecognized escape \%c in character class passed through in regex; marked by <-- HERE in m/%s/ (W regexp) You used a backslash-character combination which is not recognized by Perl inside character classes. The character was @@ -4625,13 +4625,13 @@ understood literally, but this may change in a future version of Perl. The <-- HERE shows in the regular expression about where the escape was discovered. -=item Unrecognized escape \\%c passed through +=item Unrecognized escape \%c passed through (W misc) You used a backslash-character combination which is not recognized by Perl. The character was understood literally, but this may change in a future version of Perl. -=item Unrecognized escape \\%c passed through in regex; marked by <-- HERE in m/%s/ +=item Unrecognized escape \%c passed through in regex; marked by <-- HERE in m/%s/ (W regexp) You used a backslash-character combination which is not recognized by Perl. The character was understood literally, but this may diff --git a/t/porting/diag.t b/t/porting/diag.t index 5d30823..11bbca0 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -136,6 +136,7 @@ sub check_file { $name =~ s/\\t/\t/g; $name =~ s/\\n/ /g; $name =~ s/\s+$//; + $name =~ s/(\\)\\/$1/g; } # Extra explanatory info on an already-listed error, doesn't @@ -226,9 +227,9 @@ Can't %s `%s' with ARGV[0] being `%s' (looking for executables only, not found) Can't take %s of %f Can't use '%c' after -mname Can't use string ("%s"%s) as a subroutine ref while "strict refs" in use -Can't use \\%c to mean $%c in expression +Can't use \%c to mean $%c in expression Can't use when() outside a topicalizer -\\%c better written as $%c +\%c better written as $%c Character(s) in '%c' format wrapped in %s $%c is no longer supported Cloning substitution context is unimplemented @@ -240,7 +241,7 @@ Corrupted regexp opcode %d > %d Debug leaking scalars child failed%s%s with errno %d: %s Deep recursion on anonymous subroutine defined(\%hash) is deprecated -Don't know how to handle magic of type \\%o +Don't know how to handle magic of type \%o -Dp not implemented on this platform entering effective gid failed entering effective uid failed @@ -258,12 +259,12 @@ glob failed (child exited with status %d%s) Goto undefined subroutine Goto undefined subroutine &%s Hash \%%s missing the \% in argument %d of %s() -Illegal character \\%03o (carriage return) +Illegal character \%03o (carriage return) Illegal character %sin prototype for %s : %s Integer overflow in decimal number Integer overflow in version %d internal \%p might conflict with future printf extensions -invalid control request: '\\%03o' +invalid control request: '\%03o' Invalid module name %s with -%c option: contains single ':' invalid option -D%c, use -D'' to see choices Invalid range "%c-%c" in transliteration operator @@ -282,7 +283,7 @@ Invalid strict version format (1.[0-9] required) Invalid version format (alpha without decimal) Invalid version format (misplaced _ in number) Invalid version object -It is proposed that "\\c{" no longer be valid. It has historically evaluated to ";". If you disagree with this proposal, send email to perl5-porters@perl.org Otherwise, or in the meantime, you can work around this failure by changing "\\c{" to ";" +It is proposed that "\c{" no longer be valid. It has historically evaluated to ";". If you disagree with this proposal, send email to perl5-porters@perl.org Otherwise, or in the meantime, you can work around this failure by changing "\c{" to ";" 'j' not supported on this platform 'J' not supported on this platform Layer does not match this perl @@ -313,7 +314,7 @@ PERL_SIGNALS illegal: "%s" Perl %s required (did you mean %s?)--this is only %s, stopped Perl %s required--this is only %s, stopped Perls since %s too modern--this is %s, stopped -Possible unintended interpolation of $\\ in regex +Possible unintended interpolation of $\ in regex ptr wrong %p != %p fl=%08 Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recursive call to Perl_load_module in PerlIO_find_layer @@ -379,7 +380,7 @@ Usage: VMS::Filespec::unixrealpath(spec) Usage: VMS::Filespec::vmsrealpath(spec) Use of inherited AUTOLOAD for non-method %s::%s() is deprecated UTF-16 surrogate 0x%04 -utf8 "\\x%02X" does not map to Unicode +utf8 "\x%02X" does not map to Unicode Value of logical "%s" too long. Truncating to %i bytes value of node is %d in Offset macro Value of %s%s can be "0"; test with defined()