X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperl592delta.pod;h=12e27ebe09f06441c550c607efc7cf53bffe433a;hb=2711d9fbc9d348da12bba04fd69c8ee78a0bb77a;hp=fc251a872a4b4b58b7698455c1bb5f658c7bc641;hpb=a8cf0b1d6622369ce66f477c7ed494f6ff1fd35c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perl592delta.pod b/pod/perl592delta.pod index fc251a8..12e27eb 100644 --- a/pod/perl592delta.pod +++ b/pod/perl592delta.pod @@ -13,52 +13,308 @@ differences between 5.8.0 and 5.9.1. =head2 Packing and UTF-8 strings The semantics of pack() and unpack() regarding UTF-8-encoded data has been -clarified. B Notably, code that -uses C to see through the encoding of string will now -simply return $string. +changed. Processing is now by default character per character instead of +byte per byte on the underlying encoding. Notably, code that used things +like C to see through the encoding of string will now +simply get back the original $string. Packed strings can also get upgraded +during processing when you store upgraded characters. You can get the old +behaviour by using C. To be consistent with pack(), the C in unpack() templates indicates that the data is to be processed in character mode, i.e. character by -character; at the contrary, C in unpack() indicates UTF-8 mode, where +character; on the contrary, C in unpack() indicates UTF-8 mode, where the packed string is processed in its UTF-8-encoded Unicode form on a byte by byte basis. This is reversed with regard to perl 5.8.X. Moreover, C and C can also be used in pack() templates to specify respectively character and byte modes. -C and C in the middle of a pack format now switch to the specified -encoding mode, honoring parens grouping. Previously, parens were ignored. +C and C in the middle of a pack or unpack format now switch to the +specified encoding mode, honoring parens grouping. Previously, parens were +ignored. Also, there is a new pack() character format, C, which is intended to -replace the old C. C is kept for unsigned chars coded on eight bits. -C represents unsigned character values, which can be greater than 255. -It is therefore more robust when dealing with potentially UTF-8-encoded -data (as C will wrap values outside the range 0..255). +replace the old C. C is kept for unsigned chars coded as bytes in +the strings internal representation. C represents unsigned (logical) +character values, which can be greater than 255. It is therefore more +robust when dealing with potentially UTF-8-encoded data (as C will wrap +values outside the range 0..255, and not respect the string encoding). In practice, that means that pack formats are now encoding-neutral, except C. +For consistency, C in unpack() format now trims all Unicode whitespace +from the end of the string. Before perl 5.9.2, it used to strip only the +classical ASCII space characters. + +=head2 Miscellaneous + +The internal dump output has been improved, so that non-printable characters +such as newline and backspace are output in C<\x> notation, rather than +octal. + +The B<-C> option can no longer be used on the C<#!> line. It wasn't +working there anyway. + =head1 Core Enhancements +=head2 Malloc wrapping + +Perl can now be built to detect attempts to assign pathologically large chunks +of memory. Previously such assignments would suffer from integer wrap-around +during size calculations causing a misallocation, which would crash perl, and +could theoretically be used for "stack smashing" attacks. The wrapping +defaults to enabled on platforms where we know it works (most AIX +configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP-UX, GNU Linux, OpenBSD, +Solaris, VMS and most Win32 compilers) and defaults to disabled on other +platforms. + +=head2 Unicode Character Database 4.0.1 + +The copy of the Unicode Character Database included in Perl 5.9 has +been updated to 4.0.1 from 4.0.0. + +=head2 suidperl less insecure + +Paul Szabo has analysed and patched C to remove existing known +insecurities. Currently there are no known holes in C, but previous +experience shows that we cannot be confident that these were the last. You may +no longer invoke the set uid perl directly, so to preserve backwards +compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid +binary is now CI (C for this release). C +is installed as a hard link to C; both C and C will +invoke C automatically the set uid binary, so this change should +be completely transparent. + +For new projects the core perl team would strongly recommend that you use +dedicated, single purpose security tools such as C in preference to +C. + +=head2 PERLIO_DEBUG + +The C environment variable has no longer any effect for +setuid scripts and for scripts run with B<-T>. + +Moreover, with a thread-enabled perl, using C could lead to +an internal buffer overflow. This has been fixed. + +=head2 Formats + +In addition to bug fixes, C's features have been enhanced. See +L. + +=head2 Unicode Character Classes + +Perl's regular expression engine now contains support for matching on the +intersection of two Unicode character classes. You can also now refer to +user-defined character classes from within other user defined character +classes. + +=head2 Byte-order modifiers for pack() and unpack() + +There are two new byte-order modifiers, C> (big-endian) and C> +(little-endian), that can be appended to most pack() and unpack() template +characters and groups to force a certain byte-order for that type or group. +See L and L for details. + +=head2 Byte count feature in pack() + +A new pack() template character, C<".">, returns the number of characters +read so far. + +=head2 New variables + +A new variable, ${^RE_DEBUG_FLAGS}, controls what debug flags are in +effect for the regular expression engine when running under C. See L for details. + +A new variable ${^UTF8LOCALE} indicates where an UTF-8 locale was detected +by perl at startup. + =head1 Modules and Pragmata +=head2 New modules + +=over 4 + +=item * + +C, by Autrijus Tang, is a module to emit warnings +whenever an ASCII character string containing high-bit bytes is implicitly +converted into UTF-8. + +=item * + +C, by Richard Clamp, is a small handy module that tells +you what versions of core modules ship with any versions of Perl 5. It +comes with a command-line frontend, C. + +=back + +=head2 Updated And Improved Modules and Pragmata + +Dual-lived modules have been updated to be kept up-to-date with respect to +CPAN. + +The dual-lived modules which contain an C<_> in their version number are +actually I of the corresponding CPAN release. + +=over 4 + +=item B::Concise + +C was significantly improved. + +=item Socket + +There is experimental support for Linux abstract Unix domain sockets. + +=item Sys::Syslog + +C can now use numeric constants for facility names and priorities, +in addition to strings. + +=item threads + +Detached threads are now also supported on Windows. + +=back + =head1 Utility Changes -=head1 Documentation +=over 4 + +=item * + +The C utility is now installed with perl (see L +above). + +=item * + +C and C have been made a bit more robust with regard to +"modern" C code. + +=item * + +Several bugs have been fixed in C, regarding C<-exec> and +C<-eval>. Also the options C<-path>, C<-ipath> and C<-iname> have been +added. + +=item * + +The Perl debugger can now save all debugger commands for sourcing later; +notably, it can now emulate stepping backwards, by restarting and +rerunning all bar the last command from a saved command history. + +It can also display the parent inheritance tree of a given class. + +Perl has a new -dt command-line flag, which enables threads support in the +debugger. + +=back =head1 Performance Enhancements +=over 4 + +=item * + +Unicode case mappings (C, C, C, etc) are faster. + +=item * + +C<@a = sort @a> was optimized to do in-place sort. Likewise, C is now optimized to sort in reverse, avoiding the generation of +a temporary intermediate list. + +=item * + +Unnecessary assignments are optimised away in + + my $s = undef; + my @a = (); + my %h = (); + +=item * + +C in scalar context is now optimized. + +=item * + +The regexp engine now implements the trie optimization : it's able to +factorize common prefixes and suffixes in regular expressions. A new +special variable, ${^RE_TRIE_MAXBUF}, has been added to fine-tune this +optimization. + +=back + =head1 Installation and Configuration Improvements +Run-time customization of @INC can be enabled by passing the +C<-Dusesitecustomize> flag to configure. When enabled, this will make perl +run F<$sitelibexp/sitecustomize.pl> before anything else. This script can +then be set up to add additional entries to @INC. + +There is alpha support for relocatable @INC entries. + +Perl should build on Interix and on GNU/kFreeBSD. + =head1 Selected Bug Fixes +Most of those bugs were reported in the perl 5.8.x maintenance track. +Notably, quite a few utf8 bugs were fixed, and several memory leaks were +suppressed. The perl58Xdelta manpages have more details on them. + +Development-only bug fixes include : + +C<$Foo::_> was wrongly forced as C<$main::_>. + =head1 New or Changed Diagnostics +A new warning, C, is emitted to prevent this misspelling +of the non-matching operator. + +The warning I has been removed. + +The error I has been reformulated to be more +descriptive. + +There is a new compilation error, I, +for an obscure case of syntax errors. + +The diagnostic output of Carp has been changed slightly, to add a space after +the comma between arguments. This makes it much easier for tools such as +web browsers to wrap it, but might confuse any automatic tools which perform +detailed parsing of Carp output. + +C has several improvements, making it more useable from shell +scripts to get the value of configuration variables. See L for +details. + =head1 Changed Internals +The perl core has been refactored and reorganised in several places. +In short, this release will not be binary compatible with any previous +perl release. + =head1 Known Problems -=head2 Platform Specific Problems +For threaded builds, F has been reported to +fail some tests on HP-UX 10.20. + +Net::Ping might fail some tests on HP-UX 11.00 with the latest OS +upgrades. + +F, F and F fail some +tests on some BSD flavours. + +=head1 Plans for the next release + +The current plan for perl 5.9.3 is to add CPANPLUS as a core module. +More regular expression optimizations are also in the works. + +It is planned to release a development version of perl more frequently, +i.e. each time something major changes. =head1 Reporting Bugs