In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/e33057904642d3ac97c1974cfae10cb0c1db9041?hp=5f9bdaf67f2bed117f2cb4fa9bd94bf9a7aba926>
- Log ----------------------------------------------------------------- commit e33057904642d3ac97c1974cfae10cb0c1db9041 Author: Karl Williamson <[email protected]> Date: Sat Mar 7 11:10:13 2015 -0700 locale.c: Move statements properly within #if The variables in these statments were undefined when compiled with ccflag -DNO_LOCALE, because the declarations are skipped then. Just move them a few lines up so are within the same #if. M locale.c commit 1eac213ad23c12a812d4794440e893443bbb12d2 Author: Karl Williamson <[email protected]> Date: Sat Mar 7 10:30:18 2015 -0700 use re 'strict' doc changes Add to perlexperiment; note that an alternative syntax has been proposed; nits. M ext/re/re.pm M pod/perlexperiment.pod commit 61b46553d484b1bc3ca8c690f66aedebffd73e9f Author: Karl Williamson <[email protected]> Date: Sat Mar 7 10:04:02 2015 -0700 README.synology: Wrap too-long verbatim line M README.synology commit 4ee5f30a2f74b216a7fa81d78c70b7ec0a447c7c Author: Karl Williamson <[email protected]> Date: Sat Mar 7 09:38:37 2015 -0700 perlunifaq: Nits M pod/perlunifaq.pod commit 52d1f2c99ee68f4a30c002ed93afc965ff1d56d9 Author: Karl Williamson <[email protected]> Date: Sat Mar 7 09:16:15 2015 -0700 pods: s/semantics/rules/ig in places Juerd Waalboer suggested long ago that in documentation, using the term "rules" is better than "semantics". This changes some of the places that had remained unchanged. I looked at the still-remaining places, and decided that it was best to leave them as-is. M pod/perldiag.pod M pod/perluniintro.pod ----------------------------------------------------------------------- Summary of changes: README.synology | 3 ++- ext/re/re.pm | 14 +++++++++----- locale.c | 8 ++++---- pod/perldiag.pod | 8 ++++---- pod/perlexperiment.pod | 9 +++++++++ pod/perlunifaq.pod | 14 ++++++-------- pod/perluniintro.pod | 2 +- 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/README.synology b/README.synology index fbc9e6a..c02a544 100644 --- a/README.synology +++ b/README.synology @@ -120,7 +120,8 @@ Execute the following commands: ln -s libm.so.6 libm.so ln -s libcrypt.so.1 libcrypt.so ln -s libdl.so.2 libdl.so - cd /opt/powerpc-linux-gnuspe/lib (or /opt/arm-none-linux-gnueabi/lib) + cd /opt/powerpc-linux-gnuspe/lib (or + /opt/arm-none-linux-gnueabi/lib) ln -s /lib/libdl.so.2 libdl.so =back diff --git a/ext/re/re.pm b/ext/re/re.pm index 92ddaf5..058b8aa 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -4,7 +4,7 @@ package re; use strict; use warnings; -our $VERSION = "0.31"; +our $VERSION = "0.32"; our @ISA = qw(Exporter); our @EXPORT_OK = ('regmust', qw(is_regexp regexp_pattern @@ -372,6 +372,9 @@ if $pat contains C<(?{ ... })> assertions or C<(??{ ... })> subexpressions. =head2 'strict' mode +Note that this is an experimental feature which may be changed or removed in a +future Perl release. + When C<use re 'strict'> is in effect, stricter checks are applied than otherwise when compiling regular expressions patterns. These may cause more warnings to be raised than otherwise, and more things to be fatal instead of @@ -380,8 +383,8 @@ things, which may be legal, but have a reasonable possibility of not being the programmer's actual intent. This automatically turns on the C<"regexp"> warnings category (if not already on) within its scope. -As an example of something that is caught under C<"strict'> but not otherwise -is the pattern +As an example of something that is caught under C<"strict'>, but not +otherwise, is the pattern qr/\xABC/ @@ -405,8 +408,9 @@ if there are more than two. It is expected that what exactly C<'strict'> does will evolve over time as we gain experience with it. This means that programs that compile under it in today's Perl may not compile, or may have more or fewer warnings, in future -Perls. There is no backwards compatibility promises with regards to it. For -this reason, using it will raise a C<experimental::re_strict> class warning, +Perls. There is no backwards compatibility promises with regards to it. Also +there are already proposals for an alternate syntax for enabling it. For +these reasons, using it will raise a C<experimental::re_strict> class warning, unless that category is turned off. Note that if a pattern compiled within C<'strict'> is recompiled, say by diff --git a/locale.c b/locale.c index 6c62c1f..4f0f447 100644 --- a/locale.c +++ b/locale.c @@ -1080,10 +1080,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn) Safefree(curnum); #endif /* USE_LOCALE_NUMERIC */ -#else /* !USE_LOCALE */ - PERL_UNUSED_ARG(printwarn); -#endif /* USE_LOCALE */ - #ifdef __GLIBC__ Safefree(language); #endif @@ -1091,6 +1087,10 @@ Perl_init_i18nl10n(pTHX_ int printwarn) Safefree(lc_all); Safefree(lang); +#else /* !USE_LOCALE */ + PERL_UNUSED_ARG(printwarn); +#endif /* USE_LOCALE */ + return ok; } diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 770b8ef..84462a9 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3806,7 +3806,7 @@ find the name of the file to which to write data destined for stdout. (F) Fully qualified variable names are not allowed in "our" declarations, because that doesn't make much sense under existing -semantics. Such syntax is reserved for future extensions. +rules. Such syntax is reserved for future extensions. =item No Perl script found in input @@ -4061,7 +4061,7 @@ the C<fallback> overloading key is specified to be true. See L<overload>. =item Operation "%s" returns its argument for non-Unicode code point 0x%X -(S non_unicode) You performed an operation requiring Unicode semantics +(S non_unicode) You performed an operation requiring Unicode rules on a code point that is not in Unicode, so what it should do is not defined. Perl has chosen to have it do nothing, and warn you. @@ -4074,9 +4074,9 @@ C<no warnings 'non_unicode';>. =item Operation "%s" returns its argument for UTF-16 surrogate U+%X (S surrogate) You performed an operation requiring Unicode -semantics on a Unicode surrogate. Unicode frowns upon the use +rules on a Unicode surrogate. Unicode frowns upon the use of surrogates for anything but storing strings in UTF-16, but -semantics are (reluctantly) defined for the surrogates, and +rules are (reluctantly) defined for the surrogates, and they are to do nothing for this operation. Because the use of surrogates can be dangerous, Perl warns. diff --git a/pod/perlexperiment.pod b/pod/perlexperiment.pod index ad46c0f..1e7dd27 100644 --- a/pod/perlexperiment.pod +++ b/pod/perlexperiment.pod @@ -131,6 +131,15 @@ L<[perl #123630]|https://rt.perl.org/rt3/Ticket/Display.html?id=123630>. See also: L<perlsub/Constant Functions> +=item use re 'strict'; + +Introduced in Perl 5.22.0 + +Using this feature triggers warnings in the category +C<experimental::re_strict>. + +See L<re/'strict' mode> + =item String- and number-specific bitwise operators Introduced in: Perl 5.22.0 diff --git a/pod/perlunifaq.pod b/pod/perlunifaq.pod index 19eadd4..4135fba 100644 --- a/pod/perlunifaq.pod +++ b/pod/perlunifaq.pod @@ -203,14 +203,12 @@ These are alternate syntaxes for C<decode('utf8', ...)> and C<encode('utf8', =head2 What is a "wide character"? -This is a term used both for characters with an ordinal value greater than 127, -characters with an ordinal value greater than 255, or any character occupying -more than one byte, depending on the context. - -The Perl warning "Wide character in ..." is caused by a character with an -ordinal value greater than 255. With no specified encoding layer, Perl tries to -fit things in ISO-8859-1 for backward compatibility reasons. When it can't, it -emits this warning (if warnings are enabled), and outputs UTF-8 encoded data +This is a term used for characters occupying more than one byte. + +The Perl warning "Wide character in ..." is caused by such a character. +With no specified encoding layer, Perl tries to +fit things into a single byte. When it can't, it +emits this warning (if warnings are enabled), and uses UTF-8 encoded data instead. To avoid this warning and to avoid having different output encodings in a single diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index 244cd38..e426666 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -654,7 +654,7 @@ How Do I Know Whether My String Is In Unicode? You shouldn't have to care. But you may if your Perl is before 5.14.0 or you haven't specified C<use feature 'unicode_strings'> or C<use -5.012> (or higher) because otherwise the semantics of the code points +5.012> (or higher) because otherwise the rules for the code points in the range 128 to 255 are different depending on whether the string they are contained within is in Unicode or not. (See L<perlunicode/When Unicode Does Not Happen>.) -- Perl5 Master Repository
