From: Rafael Garcia-Suarez Date: Tue, 27 Nov 2007 15:04:18 +0000 (+0000) Subject: Doc nits -- avoid bare "5.10" version numbers without a X-Git-Tag: accepted/trunk/20130322.191538~14114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99d59c4d6ec779a042ed49eb48c7c7aa214343c2;p=platform%2Fupstream%2Fperl.git Doc nits -- avoid bare "5.10" version numbers without a third component. (Suggested by Jarkko) p4raw-id: //depot/perl@32523 --- diff --git a/pod/perl5100delta.pod b/pod/perl5100delta.pod index cc92173..ce4892e 100644 --- a/pod/perl5100delta.pod +++ b/pod/perl5100delta.pod @@ -1036,8 +1036,7 @@ this optimization. (Yves Orton) B Much code exists that works around perl's historic poor performance on alternations. Often the tricks used to do so will disable the new optimisations. Hopefully the utility modules used for this purpose -will be educated about these new optimisations by the time 5.10 is -released. +will be educated about these new optimisations. =item Aho-Corasick start-point optimisation diff --git a/pod/perlre.pod b/pod/perlre.pod index 3576364..015881b 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -521,14 +521,14 @@ backreferences. X<\g{1}> X<\g{-1}> X<\g{name}> X X In order to provide a safer and easier way to construct patterns using -backreferences, Perl 5.10 provides the C<\g{N}> notation. The curly -brackets are optional, however omitting them is less safe as the meaning -of the pattern can be changed by text (such as digits) following it. -When N is a positive integer the C<\g{N}> notation is exactly equivalent -to using normal backreferences. When N is a negative integer then it is -a relative backreference referring to the previous N'th capturing group. -When the bracket form is used and N is not an integer, it is treated as a -reference to a named buffer. +backreferences, Perl provides the C<\g{N}> notation (starting with perl +5.10.0). The curly brackets are optional, however omitting them is less +safe as the meaning of the pattern can be changed by text (such as digits) +following it. When N is a positive integer the C<\g{N}> notation is +exactly equivalent to using normal backreferences. When N is a negative +integer then it is a relative backreference referring to the previous N'th +capturing group. When the bracket form is used and N is not an integer, it +is treated as a reference to a named buffer. Thus C<\g{-1}> refers to the last buffer, C<\g{-2}> refers to the buffer before that. For example: @@ -544,7 +544,7 @@ buffer before that. For example: and would match the same as C. -Additionally, as of Perl 5.10 you may use named capture buffers and named +Additionally, as of Perl 5.10.0 you may use named capture buffers and named backreferences. The notation is C<< (?...) >> to declare and C<< \k >> to reference. You may also use apostrophes instead of angle brackets to delimit the name; and you may use the bracketed C<< \g{name} >> backreference syntax. @@ -614,7 +614,7 @@ already paid the price. As of 5.005, C<$&> is not so costly as the other two. X<$&> X<$`> X<$'> -As a workaround for this problem, Perl 5.10 introduces C<${^PREMATCH}>, +As a workaround for this problem, Perl 5.10.0 introduces C<${^PREMATCH}>, C<${^MATCH}> and C<${^POSTMATCH}>, which are equivalent to C<$`>, C<$&> and C<$'>, B that they are only guaranteed to be defined after a successful match that was executed with the C

(preserve) modifier. @@ -740,7 +740,7 @@ X<(?|)> X This is the "branch reset" pattern, which has the special property that the capture buffers are numbered from the same starting point -in each alternation branch. It is available starting from perl 5.10. +in each alternation branch. It is available starting from perl 5.10.0. Capture buffers are numbered from left to right, but inside this construct the numbering is restarted for each branch. @@ -2108,9 +2108,9 @@ part of this regular expression needs to be converted explicitly =head1 PCRE/Python Support -As of Perl 5.10 Perl supports several Python/PCRE specific extensions +As of Perl 5.10.0, Perl supports several Python/PCRE specific extensions to the regex syntax. While Perl programmers are encouraged to use the -Perl specific syntax, the following are legal in Perl 5.10: +Perl specific syntax, the following are also accepted: =over 4 diff --git a/pod/perlreapi.pod b/pod/perlreapi.pod index 6e5be84..f8e9984 100644 --- a/pod/perlreapi.pod +++ b/pod/perlreapi.pod @@ -302,7 +302,7 @@ variables, to do this in another engine use the following callback Perl_croak(aTHX_ PL_no_modify); } -Actually perl 5.10 will not I croak in a statement that looks +Actually perl will not I croak in a statement that looks like it would modify a numbered capture variable. This is because the STORE callback will not be called if perl can determine that it doesn't have to modify the value. This is exactly how tied variables diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index ac95ace..ddd7abe 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -293,7 +293,7 @@ L. C<\w> is a character class that matches any I character (letters, digits, underscore). C<\d> is a character class that matches any digit, while the character class C<\s> matches any white space character. -New in perl 5.10 are the classes C<\h> and C<\v> which match horizontal +New in perl 5.10.0 are the classes C<\h> and C<\v> which match horizontal and vertical white space characters. The uppercase variants (C<\W>, C<\D>, C<\S>, C<\H>, and C<\V>) are @@ -340,7 +340,7 @@ as well. =head3 Relative referencing -New in perl 5.10 is different way of referring to capture buffers: C<\g>. +New in perl 5.10.0 is a different way of referring to capture buffers: C<\g>. C<\g> takes a number as argument, with the number in curly braces (the braces are optional). If the number (N) does not have a sign, it's a reference to the Nth capture group (so C<\g{2}> is equivalent to C<\2> - except that @@ -369,7 +369,7 @@ Mnemonic: Iroup. =head3 Named referencing -Also new in perl 5.10 is the use of named capture buffers, which can be +Also new in perl 5.10.0 is the use of named capture buffers, which can be referred to by name. This is done with C<\g{name}>, which is a backreference to the capture buffer with the name I. @@ -482,7 +482,7 @@ Mnemonic: oItet. =item \K -This is new in perl 5.10. Anything that is matched left of C<\K> is +This is new in perl 5.10.0. Anything that is matched left of C<\K> is not included in C<$&> - and will not be replaced if the pattern is used in a substitution. This will allow you to write C instead of C or C. @@ -498,7 +498,7 @@ a newline by Unicode. This includes all characters matched by C<\v> the newline used in Windows text files). C<\R> is equivalent with C<< (?>\x0D\x0A)|\v) >>. Since C<\R> can match a more than one character, it cannot be put inside a bracketed character class; C is an error. -C<\R> is introduced in perl 5.10. +C<\R> was introduced in perl 5.10.0. Mnemonic: none really. C<\R> was picked because PCRE already uses C<\R>, and more importantly because Unicode recommends such a regular expression diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod index afdf116..4af2c97 100644 --- a/pod/perlrecharclass.pod +++ b/pod/perlrecharclass.pod @@ -122,7 +122,7 @@ rules. It's not a character class, as it can match a multi-character sequence. Therefore, it cannot be used inside a bracketed character class. Details are discussed in L. -C<\h>, C<\H>, C<\v>, C<\V>, and C<\R> are new in perl 5.10. +C<\h>, C<\H>, C<\v>, C<\V>, and C<\R> are new in perl 5.10.0. Note that unlike C<\s>, C<\d> and C<\w>, C<\h> and C<\v> always match the same characters, regardless whether the source string is in UTF-8