From 9ba22424c6f4c8c245fd5f3626f164f30c092c11 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 18 Jan 2012 10:57:44 -0700 Subject: [PATCH] perluniintro: Shorten too-long verbatim lines --- pod/perluniintro.pod | 7 ++++--- t/porting/known_pod_issues.dat | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index 2ca2da2..edd1ab4 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -303,7 +303,8 @@ will work on the Unicode characters (see L and L). Note that Perl considers grapheme clusters to be separate characters, so for example - print length("\N{LATIN CAPITAL LETTER A}\N{COMBINING ACUTE ACCENT}"), "\n"; + print length("\N{LATIN CAPITAL LETTER A}\N{COMBINING ACUTE ACCENT}"), + "\n"; will print 2, not 1. The only exception is that regular expressions have C<\X> for matching an extended grapheme cluster. (Thus C<\X> in a @@ -474,7 +475,7 @@ displayed as C<\x..>, and the rest of the characters as themselves: join("", map { $_ > 255 ? # if wide character... sprintf("\\x{%04X}", $_) : # \x{...} - chr($_) =~ /[[:cntrl:]]/ ? # else if control character ... + chr($_) =~ /[[:cntrl:]]/ ? # else if control character... sprintf("\\x%02X", $_) : # \x.. quotemeta(chr($_)) # else quoted or as themselves } unpack("W*", $_[0])); # unpack Unicode characters @@ -690,7 +691,7 @@ and the C function: my $unicode = chr(0x100); print length($unicode), "\n"; # will print 1 require Encode; - print length(Encode::encode_utf8($unicode)), "\n"; # will print 2 + print length(Encode::encode_utf8($unicode)),"\n"; # will print 2 use bytes; print length($unicode), "\n"; # will also print 2 # (the 0xC4 0x80 of the UTF-8) diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat index d388240..2e517c0 100644 --- a/t/porting/known_pod_issues.dat +++ b/t/porting/known_pod_issues.dat @@ -282,7 +282,6 @@ pod/perltrap.pod Verbatim line length including indents exceeds 79 by 15 pod/perltru64.pod ? Should you be using F<...> or maybe L<...> instead of 1 pod/perltru64.pod Verbatim line length including indents exceeds 79 by 4 pod/perlunifaq.pod empty section in previous paragraph 1 -pod/perluniintro.pod Verbatim line length including indents exceeds 79 by 3 pod/perluniprops.pod =item type mismatch 6 pod/perlvar.pod Verbatim line length including indents exceeds 79 by 9 pod/perlvms.pod ? Should you be using F<...> or maybe L<...> instead of 1 -- 2.7.4