X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldelta.pod;h=f2505e8dac579486f941b427a3504899cef87e47;hb=f7686833794ab18a8c8729b0e836f6f14223ce97;hp=610e84b8c79890cdcc5791ca86b4a38ed92b6f1b;hpb=23d2500b2b45b1beddc8de6ccd7c60068286d061;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 610e84b..f2505e8 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1,2783 +1,2335 @@ =head1 NAME -perldelta - what's new for perl v5.6.0 +perldelta - what is new for perl v5.8.0 =head1 DESCRIPTION -This document describes differences between the 5.005 release and this one. +This document describes differences between the 5.6.0 release and the +5.8.0 release. =head1 Incompatible Changes -=head2 Perl Source Incompatibilities +=over 4 -Beware that any new warnings that have been added or old ones -that have been enhanced are B considered incompatible changes. +=item * -Since all new warnings must be explicitly requested via the C<-w> -switch or the C pragma, it is ultimately the programmer's -responsibility to ensure that warnings are enabled judiciously. +The semantics of bless(REF, REF) were unclear and until someone proves +it to make some sense, it is forbidden. -=over 4 +=item * -=item CHECK is a new keyword +A reference to a reference now stringify as "REF(0x81485ec)" instead +of "SCALAR(0x81485ec)" in order to be more consistent with the return +value of ref(). -In addition to C, C, C, C and C, -subroutines named C are now special. These are queued up during -compilation and behave similar to END blocks, except they are called at -the end of compilation rather than at the end of execution. They cannot -be called directly. +=item * -=item Treatment of list slices of undef has changed +The very dusty examples in the eg/ directory have been removed. +Suggestions for new shiny examples welcome but the main issue is that +the examples need to be documented, tested and (most importantly) +maintained. -When taking a slice of a literal list (as opposed to a slice of -an array or hash), Perl used to return an empty list if the -result happened to be composed of all undef values. +=item * -The new behavior is to produce an empty list if (and only if) -the original list was empty. Consider the following example: +The obsolete chat2 library that should never have been allowed +to escape the laboratory has been decommissioned. - @a = (1,undef,undef,2)[2,1,2]; +=item * -The old behavior would have resulted in @a having no elements. -The new behavior ensures it has three undefined elements. +The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still +recognised but now cause fatal errors. The previous behaviour of +ignoring them by default and warning if requested was unacceptable +since it, in a way, falsely promised that the features could be used. -Note in particular that the behavior of slices of the following -cases remains unchanged: +=item * - @a = ()[1,2]; - @a = (getpwent)[7,0]; - @a = (anything_returning_empty_list())[2,1,2]; - @a = @b[2,1,2]; - @a = @c{'a','b','c'}; +The (bogus) escape sequences \8 and \9 now give an optional warning +("Unrecognized escape passed through"). There is no need to \-escape +any C<\w> character. -See L. +=item * -=head2 Perl's version numbering has changed +lstat(FILEHANDLE) now gives a warning because the operation makes no sense. +In future releases this may become a fatal error. -Beginning with Perl version 5.6.0, the version number convention has been -changed to a "dotted integer" scheme that is more commonly found in open -source projects. +=item * -Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc. -The next development series following v5.6.0 will be numbered v5.7.x, -beginning with v5.7.0, and the next major production release following -v5.6.0 will be v5.8.0. +The long deprecated uppercase aliases for the string comparison +operators (EQ, NE, LT, LE, GE, GT) have now been removed. -The English module now sets $PERL_VERSION to $^V (a string value) rather -than C<$]> (a numeric value). (This is a potential incompatibility. -Send us a report via perlbug if you are affected by this.) +=item * -The v1.2.3 syntax is also now legal in Perl. -See L for more on that. +The regular expression captured submatches ($1, $2, ...) are now +more consistently unset if the match fails, instead of leaving false +data lying around in them. -To cope with the new versioning system's use of at least three significant -digits for each version component, the method used for incrementing the -subversion number has also changed slightly. We assume that versions older -than v5.6.0 have been incrementing the subversion component in multiples of -10. Versions after v5.6.0 will increment them by 1. Thus, using the new -notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance -version following v5.6.0 will be v5.6.1 (which should be read as being -equivalent to a floating point value of 5.006_001 in the older format, -stored in C<$]>). +=item * -=item Literals of the form C<1.2.3> parse differently +The tr///C and tr///U features have been removed and will not return; +the interface was a mistake. Sorry about that. For similar +functionality, see pack('U0', ...) and pack('C0', ...). -Previously, numeric literals with more than one dot in them were -interpreted as a floating point number concatenated with one or more -numbers. Such "numbers" are now parsed as strings composed of the -specified ordinals. +=item * -For example, C used to output C<97.9899> in earlier -versions, but now prints C. +Although "you shouldn't do that", it was possible to write code that +depends on Perl's hashed key order (Data::Dumper does this). The new +algorithm "One-at-a-Time" produces a different hashed key order. +More details are in L. -See L below. +=item * -=item Possibly changed pseudo-random number generator +The list of filenames from glob() (or <...>) is now by default sorted +alphabetically to be csh-compliant. (bsd_glob() does still sort platform +natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) -In 5.005_0x and earlier, perl's rand() function used the C library -rand(3) function. As of 5.005_52, Configure tests for drand48(), -random(), and rand() (in that order) and picks the first one it finds. -Perl programs that depend on reproducing a specific set of pseudo-random -numbers will now likely produce different output. You can use -C to obtain the old behavior. +=back -=item Hashing function for hash keys has changed +=head2 64-bit platforms and malloc -Perl hashes are not order preserving. The apparently random order -encountered when iterating on the contents of a hash is determined -by the hashing algorithm used. To improve the distribution of lower -bits in the hashed value, the algorithm has changed slightly as of -5.005_52. When iterating over hashes, this may yield a random order -that is B from that of previous versions. +If your pointers are 64 bits wide, the Perl malloc is no more being +used because it simply does not work with 8-byte pointers. Also, +usually the system malloc on such platforms are much better optimized +for such large memory models than the Perl malloc. -=item C fails on read only values +=head2 AIX Dynaloading -Using the C operator on a readonly value (such as $1) has -the same effect as assigning C to the readonly value--it -throws an exception. +The AIX dynaloading now uses in AIX releases 4.3 and newer the native +dlopen interface of AIX instead of the old emulated interface. This +change will probably break backward compatibility with compiled +modules. The change was made to make Perl more compliant with other +applications like modperl which are using the AIX native interface. -=item Close-on-exec bit may be set on pipe and socket handles +=head2 Socket Extension Dynamic in VMS -On systems that support a close-on-exec flag on filehandles, the -flag will be set for any handles created by pipe(), socketpair(), -socket(), and accept(), if that is warranted by the value of $^F -that may be in effect. Earlier versions neglected to set the flag -for handles created with these operators. See L, -L, L, L, -and L. +The Socket extension is now dynamically loaded instead of being +statically built in. This may or may not be a problem with ancient +TCP/IP stacks of VMS: we do not know since we weren't able to test +Perl in such configurations. -=item Writing C<"$$1"> to mean C<"${$}1"> is unsupported +=head2 Different Definition of the Unicode Character Classes \p{In...} -Perl 5.004 deprecated the interpretation of C<$$1> and -similar within interpolated strings to mean C<$$ . "1">, -but still allowed it. +As suggested by the Unicode consortium, the Unicode character classes +now prefer I as opposed to I (as defined by Unicode); +in Perl, when the C<\p{In....}> and the C<\p{In....}> regular expression +constructs are used. This has changed the definition of some of those +character classes. -In Perl 5.6.0 and later, C<"$$1"> always means C<"${$1}">. +The difference between scripts and blocks is that scripts are the +glyphs used by a language or a group of languages, while the blocks +are more artificial groupings of 256 characters based on the Unicode +numbering. -=item delete(), values() and C<\(%h)> operate on aliases to values, not copies +In general this change results in more inclusive Unicode character +classes, but changes to the other direction also do take place: +for example while the script C includes all the Latin +characters and their various diacritic-adorned versions, it +does not include the various punctuation or digits (since they +are not solely C). -delete(), each(), values() and hashes in a list context return the actual -values in the hash, instead of copies (as they used to in earlier -versions). Typical idioms for using these constructs copy the -returned values, but this can make a significant difference when -creating references to the returned values. +Changes in the character class semantics may have happened if a script +and a block happen to have the same name, for example C. +In such cases the script wins and C<\p{InHebrew}> now means the script +definition of Hebrew. The block definition in still available, +though, by appending C to the name: C<\p{InHebrewBlock}> means +what C<\p{InHebrew}> meant in perl 5.6.0. For the full list +of affected character classes, see L. -Keys in the hash are still returned as copies when iterating on -a hash. +=head2 Deprecations -=item vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS +The current user-visible implementation of pseudo-hashes (the weird +use of the first array element) is deprecated starting from Perl 5.8.0 +and will be removed in Perl 5.10.0, and the feature will be +implemented differently. Not only is the current interface rather +ugly, but the current implementation slows down normal array and hash +use quite noticeably. The C pragma interface will remain +available. -vec() generates a run-time error if the BITS argument is not -a valid power-of-two integer. +The syntaxes C<@a->[...]> and C<@h->{...}> have now been deprecated. -=item Text of some diagnostic output has changed +The suidperl is also considered to be too much a risk to continue +maintaining and the suidperl code is likely to be removed in a future +release. -Most references to internal Perl operations in diagnostics -have been changed to be more descriptive. This may be an -issue for programs that may incorrectly rely on the exact -text of diagnostics for proper functioning. +The C syntax (C without an argument has been +deprecated. Its semantics were never that clear and its +implementation even less so. If you have used that feature to +disallow all but fully qualified variables, C instead. -=item C<%@> has been removed +The chdir(undef) and chdir('') behaviors to match chdir() has been +deprecated. In future versions, chdir(undef) and chdir('') will +simply fail. -The undocumented special variable C<%@> that used to accumulate -"background" errors (such as those that happen in DESTROY()) -has been removed, because it could potentially result in memory -leaks. +=head1 Core Enhancements -=item Parenthesized not() behaves like a list operator +=over 4 -The C operator now falls under the "if it looks like a function, -it behaves like a function" rule. +=item * -As a result, the parenthesized form can be used with C and C. -The following construct used to be a syntax error before, but it works -as expected now: +C now works (previously one couldn't pass +in multiple arguments.) - grep not($_), @things; +=item * -On the other hand, using C with a literal list slice may not -work. The following previously allowed construct: +my __PACKAGE__ $obj now works. - print not (1,2,3)[0]; +=item * -needs to be written with additional parentheses now: +C now works even if there is no "sub unimport" in the Module. - print not((1,2,3)[0]); +=item * -The behavior remains unaffected when C is not followed by parentheses. +The numerical comparison operators return C if either operand +is a NaN. Previously the behaviour was unspecified. -=item Semantics of bareword prototype C<(*)> have changed +=item * -Arguments prototyped as C<*> will now be visible within the subroutine -as either a simple scalar or as a reference to a typeglob. Perl 5.005 -always coerced simple scalar arguments to a typeglob, which wasn't useful -in situations where the subroutine must distinguish between a simple -scalar and a typeglob. See L. +C can now be used to force a string to UTF8. -=head2 On 64-bit platforms the semantics of bit operators have changed +=item * -If your platform is either natively 64-bit or your Perl has been -configured to used 64-bit integers, i.e., $Config{ivsize} is 8, -be warned that the semantics of all the bitwise numeric operators -(& | ^ ~ << >>) have been changed. These operators used to strictly -operate on the lower 32 bits of integers, but now operate over the -entire width of native integers. In particular, note that unary C<~> -will produce different results on platforms that have different -$Config{ivsize}. For portability, be sure to mask off the excess bits -in the result of unary C<~>, e.g., C<~$x & 0xffffffff>. +prototype(\&) is now available. -=head2 More builtins taint their results +=item * -The C and C fields returned by the getpwent(), getpwnam(), -and getpwuid() are now tainted, because the user can affect their own -encrypted password and login shell. +There is now an UNTIE method. -The variable modified by shmread(), and messages returned by msgrcv() -(and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted, -because other untrusted processes can modify messages and shared memory -segments for their own nefarious purposes. +=back -To avoid these new tainting behaviors, you can build Perl with the -Configure option C<-Accflags=-DINCOMPLETE_TAINTS>. Beware that the -ensuing perl binary may be insecure. +=head2 AUTOLOAD Is Now Lvaluable -=back +AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute +to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value. -=head2 C Source Incompatibilities +=head2 PerlIO is Now The Default =over 4 -=item C +=item * -Release 5.005 grandfathered old global symbol names by providing preprocessor -macros for extension source compatibility. As of release 5.6.0, these -preprocessor definitions are not available by default. You need to explicitly -compile perl with C<-DPERL_POLLUTE> to get these definitions. For -extensions still using the old symbols, this option can be -specified via MakeMaker: +IO is now by default done via PerlIO rather than system's "stdio". +PerlIO allows "layers" to be "pushed" onto a file handle to alter the +handle's behaviour. Layers can be specified at open time via 3-arg +form of open: - perl Makefile.PL POLLUTE=1 + open($fh,'>:crlf :utf8', $path) || ... -=item C +or on already opened handles via extended C: - NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built - with one of -Dusethreads, -Dusemultiplicity, or both. It is not - intended to be enabled by users at this time. + binmode($fh,':encoding(iso-8859-7)'); -This new build option provides a set of macros for all API functions -such that an implicit interpreter/thread context argument is passed to -every API function. As a result of this, something like C -amounts to a macro invocation that actually translates to something like -C. While this is generally expected -to not have any significant source compatibility issues, the difference -between a macro and a real function call will need to be considered. +The built-in layers are: unix (low level read/write), stdio (as in +previous Perls), perlio (re-implementation of stdio buffering in a +portable manner), crlf (does CRLF <=> "\n" translation as on Win32, +but available on any platform). A mmap layer may be available if +platform supports it (mostly UNIXes). -This means that there B a source compatibility issue as a result of -this if your extensions attempt to use pointers to any of the Perl API -functions. +Layers to be applied by default may be specified via the 'open' pragma. -Note that the above issue is not relevant to the default build of -Perl, whose interfaces continue to match those of prior versions -(but subject to the other options described here). +See L for the effects +of PerlIO on your architecture name. -See L for detailed information on the -ramifications of building Perl with this option. +=item * -=item C +File handles can be marked as accepting Perl's internal encoding of Unicode +(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" : -Enabling Perl's malloc in release 5.005 and earlier caused the namespace of -the system's malloc family of functions to be usurped by the Perl versions, -since by default they used the same names. Besides causing problems on -platforms that do not allow these functions to be cleanly replaced, this -also meant that the system versions could not be called in programs that -used Perl's malloc. Previous versions of Perl have allowed this behaviour -to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor -definitions. + open($fh,">:utf8","Uni.txt"); -As of release 5.6.0, Perl's malloc family of functions have default names -distinct from the system versions. You need to explicitly compile perl with -C<-DPERL_POLLUTE_MALLOC> to get the older behaviour. HIDEMYMALLOC -and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now -the default. +Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named +for you since it's not UTF-8 what you will be getting but instead +UTF-EBCDIC. See L, L, and +http://www.unicode.org/unicode/reports/tr16/ for more information. +In future releases this naming may change. -Note that these functions do B constitute Perl's memory allocation API. -See L for further information about that. +=item * -=back +File handles can translate character encodings from/to Perl's internal +Unicode form on read/write via the ":encoding()" layer. -=head2 Compatible C Source API Changes +=item * -=over +File handles can be opened to "in memory" files held in Perl scalars via: -=item C is now C + open($fh,'>', \$variable) || ... -The cpp macros C, C, and C -are now available by default from perl.h, and reflect the base revision, -patchlevel, and subversion respectively. C had no -prior equivalent, while C and C were -previously available as C and C. +=item * -The new names cause less pollution of the B namespace and reflect what -the numbers have come to stand for in common practice. For compatibility, -the old names are still supported when F is explicitly -included (as required before), so there is no source incompatibility -from the change. +Anonymous temporary files are available without need to +'use FileHandle' or other module via -=back + open($fh,"+>", undef) || ... -=head2 Binary Incompatibilities +That is a literal undef, not an undefined value. -In general, the default build of this release is expected to be binary -compatible for extensions built with the 5.005 release or its maintenance -versions. However, specific platforms may have broken binary compatibility -due to changes in the defaults used in hints files. Therefore, please be -sure to always check the platform-specific README files for any notes to -the contrary. +=item * -The usethreads or usemultiplicity builds are B binary compatible -with the corresponding builds in 5.005. +The list form of C is now implemented for pipes (at least on UNIX): -On platforms that require an explicit list of exports (AIX, OS/2 and Windows, -among others), purely internal symbols such as parser functions and the -run time opcodes are not exported by default. Perl 5.005 used to export -all functions irrespective of whether they were considered part of the -public API or not. + open($fh,"-|", 'cat', '/etc/motd') -For the full list of public API functions, see L. +creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in +the child process. -=head1 Installation and Configuration Improvements +=item * -=head2 -Dusethreads means something different +The following builtin functions are now overridable: chop(), chomp(), +each(), keys(), pop(), push(), shift(), splice(), unshift(). - WARNING: Support for threads continues to be an experimental feature. - Interfaces and implementation are subject to sudden and drastic changes. +=item * -The -Dusethreads flag now enables the experimental interpreter-based thread -support by default. To get the flavor of experimental threads that was in -5.005 instead, you need to run Configure with "-Dusethreads -Duse5005threads". +Formats now support zero-padded decimal fields. -As of v5.6.0, interpreter-threads support is still lacking a way to -create new threads from Perl (i.e., C will not work with -interpreter threads). C continues to be available when you -specify the -Duse5005threads option to Configure, bugs and all. +=item * -=head2 New Configure flags +Perl now tries internally to use integer values in numeric conversions +and basic arithmetics (+ - * /) if the arguments are integers, and +tries also to keep the results stored internally as integers. +This change leads into often slightly faster and always less lossy +arithmetics. (Previously Perl always preferred floating point numbers +in its math.) -The following new flags may be enabled on the Configure command line -by running Configure with C<-Dflag>. +=item * - usemultiplicity - usethreads useithreads (new interpreter threads: no Perl API yet) - usethreads use5005threads (threads as they were in 5.005) +The printf() and sprintf() now support parameter reordering using the +C<%\d+\$> and C<*\d+\$> syntaxes. For example - use64bitint (equal to now deprecated 'use64bits') - use64bitall + print "%2\$s %1\$s\n", "foo", "bar"; - uselongdouble - usemorebits - uselargefiles - usesocks (only SOCKS v5 supported) +will print "bar foo\n"; This feature helps in writing +internationalised software. -=head2 Threadedness and 64-bitness now more daring +=item * -The Configure options enabling the use of threads and the use of -64-bitness are now more daring in the sense that they no more have an -explicit list of operating systems of known threads/64-bit -capabilities. In other words: if your operating system has the -necessary APIs and datatypes, you should be able just to go ahead and -use them, for threads by Configure -Dusethreads, and for 64 bits -either explicitly by Configure -Duse64bitint or implicitly if your -system has 64-bit wide datatypes. See also L<"64-bit support">. +Unicode in general should be now much more usable. Unicode can be +used in hash keys, Unicode in regular expressions should work now, +Unicode in tr/// should work now (though tr/// seems to be a +particularly tricky to get right, so you have been warned) -=head2 Long Doubles +=item * -Some platforms have "long doubles", floating point numbers of even -larger range than ordinary "doubles". To enable using long doubles for -Perl's scalars, use -Duselongdouble. +The Unicode Character Database coming with Perl has been upgraded +to Unicode 3.1. For more information, see http://www.unicode.org/, +and http://www.unicode.org/unicode/reports/tr27/ -=head2 -Dusemorebits +For developers interested in enhancing Perl's Unicode capabilities: +almost all the UCD files are included with the Perl distribution in +the lib/unicode subdirectory. The most notable omission, for space +considerations, is the Unihan database. -You can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits. -See also L<"64-bit support">. +=item * -=head2 -Duselargefiles +The Unicode character classes \p{Blank} and \p{SpacePerl} have been +added. "Blank" is like C isblank(), that is, it contains only +"horizontal whitespace" (the space character is, the newline isn't), +and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space} +isn't, since that includes the vertical tabulator character, whereas +C<\s> doesn't.) -Some platforms support system APIs that are capable of handling large files -(typically, files larger than two gigabytes). Perl will try to use these -APIs if you ask for -Duselargefiles. +=back -See L<"Large file support"> for more information. +=head2 Signals Are Now Safe -=head2 installusrbinperl +Perl used to be fragile in that signals arriving at inopportune moments +could corrupt Perl's internal state. -You can use "Configure -Uinstallusrbinperl" which causes installperl -to skip installing perl also as /usr/bin/perl. This is useful if you -prefer not to modify /usr/bin for some reason or another but harmful -because many scripts assume to find Perl in /usr/bin/perl. +=head2 Understanding of Numbers -=head2 SOCKS support +In general a lot of fixing has happened in the area of Perl's +understanding of numbers, both integer and floating point. Since in +many systems the standard number parsing functions like C +and C seem to have bugs, Perl tries to work around their +deficiencies. This results hopefully in more accurate numbers. -You can use "Configure -Dusesocks" which causes Perl to probe -for the SOCKS proxy protocol library (v5, not v4). For more information -on SOCKS, see: +=over 4 - http://www.socks.nec.com/ +=item * -=head2 C<-A> flag +The rules for allowing underscores (underbars) in numeric constants +have been relaxed and simplified: now you can have an underscore +B. -You can "post-edit" the Configure variables using the Configure C<-A> -switch. The editing happens immediately after the platform specific -hints files have been processed but before the actual configuration -process starts. Run C to find out the full C<-A> syntax. +=item * -=head2 Enhanced Installation Directories +GMAGIC (right-hand side magic) could in many cases such as string +concatenation be invoked too many times. -The installation structure has been enriched to improve the support -for maintaining multiple versions of perl, to provide locations for -vendor-supplied modules, scripts, and manpages, and to ease maintenance -of locally-added modules, scripts, and manpages. See the section on -Installation Directories in the INSTALL file for complete details. -For most users building and installing from source, the defaults should -be fine. +=item * -If you previously used C or C<-Dsitearch> to set -special values for library directories, you might wish to consider using -the new C<-Dsiteprefix> setting instead. Also, if you wish to re-use a -config.sh file from an earlier version of perl, you should be sure to -check that Configure makes sensible choices for the new directories. -See INSTALL for complete details. +Lexicals I: lexicals outside an eval "" weren't resolved +correctly inside a subroutine definition inside the eval "" if they +were not already referenced in the top level of the eval""ed code. -=head1 Core Changes +=item * -=head2 Unicode and UTF-8 support +Lexicals II: lexicals leaked at file scope into subroutines that +were declared before the lexicals. - WARNING: This is an experimental feature. Implementation details are - subject to change. +=item * -Perl now uses UTF-8 as its internal representation for character -strings. The C and C pragmas are used to control this support -in the current lexical scope. See L, L and L for -more information. +Lvalue subroutines can now return C in list context. -=head2 Interpreter cloning, threads, and concurrency +=item * - WARNING: This is an experimental feature. Implementation details are - subject to change. +The C and C are now exported. -Perl 5.005_63 introduces the beginnings of support for running multiple -interpreters concurrently in different threads. In conjunction with -the perl_clone() API call, which can be used to selectively duplicate -the state of any given interpreter, it is possible to compile a -piece of code once in an interpreter, clone that interpreter -one or more times, and run all the resulting interpreters in distinct -threads. +=item * -On Windows, this feature is used to emulate fork() at the interpreter -level. See L. +A new special regular expression variable has been introduced: +C<$^N>, which contains the most-recently closed group (submatch). -This feature is still in evolution. It is eventually meant to be used -to selectively clone a subroutine and data reachable from that -subroutine in a separate interpreter and run the cloned subroutine -in a separate thread. Since there is no shared data between the -interpreters, little or no locking will be needed (unless parts of -the symbol table are explicitly shared). This is obviously intended -to be an easy-to-use replacement for the existing threads support. +=item * -Support for cloning interpreters and interpreter concurrency can be -enabled using the -Dusethreads Configure option (see win32/Makefile for -how to enable it on Windows.) The resulting perl executable will be -functionally identical to one that was built with -Dmultiplicity, but -the perl_clone() API call will only be available in the former. +L now supports C to change the +file timestamps to the current time. --Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn -enables Perl source code changes that provide a clear separation between -the op tree and the data it operates with. The former is immutable, and -can therefore be shared between an interpreter and all of its clones, -while the latter is considered local to each interpreter, and is therefore -copied for each clone. +=item * -Note that building Perl with the -Dusemultiplicity Configure option -is adequate if you wish to run multiple B interpreters -concurrently in different threads. -Dusethreads only provides the -additional functionality of the perl_clone() API call and other -support for running B interpreters concurrently. +The Perl parser has been stress tested using both random input and +Markov chain input. -=head2 Lexically scoped warning categories +=item * -You can now control the granularity of warnings emitted by perl at a finer -level using the C pragma. See L and L -for details. +C now works. -=head2 Lvalue subroutines - - WARNING: This is an experimental feature. Details are subject to change. - -Subroutines can now return modifiable lvalues. -See L. - -=head2 "our" declarations - -An "our" declaration introduces a value that can be best understood -as a lexically scoped symbolic alias to a global variable in the -package that was current where the variable was declared. This is -mostly useful as an alternative to the C pragma, but also provides -the opportunity to introduce typing and other attributes for such -variables. See L. - -=head2 Support for strings represented as a vector of ordinals - -Literals of the form C are now parsed as a string composed of -of characters with the specified ordinals. This is an alternative, more -readable way to construct (possibly unicode) strings instead of -interpolating characters, as in C<"\x{1}\x{2}\x{3}\x{4}">. The leading -C may be omitted if there are more than two ordinals, so C<1.2.3> is -parsed the same as C. - -Strings written in this form are also useful to represent version "numbers". -It is easy to compare such version "numbers" (which are really just plain -strings) using any of the usual string comparison operators C, C, -C, C, etc., or perform bitwise string operations on them using C<|>, -C<&>, etc. - -In conjunction with the new C<$^V> magic variable (which contains -the perl version as a string), such literals can be used as a readable way -to check if you're running a particular version of Perl: - - # this will parse in older versions of Perl also - if ($^V and $^V gt v5.6.0) { - # new features supported - } +=item * -C and C also have some special magic to support such literals. -They will be interpreted as a version rather than as a module name: +VMS now works under PerlIO. - require v5.6.0; # croak if $^V lt v5.6.0 - use v5.6.0; # same, but croaks at compile-time +=item * -Alternatively, the C may be omitted if there is more than one dot: +END blocks are now run even if you exit/die in a BEGIN block. +The execution of END blocks is now controlled by +PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new +behaviour for perl embedders. This will default in 5.10. See +L. - require 5.6.0; - use 5.6.0; +=back -Also, C and C support the Perl-specific format flag C<%v> -to print ordinals of characters in arbitrary strings: +=head1 Modules and Pragmata - printf "v%vd", $^V; # prints current version, such as "v5.5.650" - printf "%*vX", ":", $addr; # formats IPv6 address - printf "%*vb", " ", $bits; # displays bitstring +=head2 New Modules -See L for additional information. +=over 4 -=head2 Weak references +=item * - WARNING: This is an experimental feature. Details are subject to change. +File::Temp allows one to create temporary files and directories in an +easy, portable, and secure way. -In previous versions of Perl, you couldn't cache objects so as -to allow them to be deleted if the last reference from outside -the cache is deleted. The reference in the cache would hold a -reference count on the object and the objects would never be -destroyed. +=item * -Another familiar problem is with circular references. When an -object references itself, its reference count would never go -down to zero, and it would not get destroyed until the program -is about to exit. +Storable gives persistence to Perl data structures by allowing the +storage and retrieval of Perl data to and from files in a fast and +compact binary format. -Weak references solve this by allowing you to "weaken" any -reference, that is, make it not count towards the reference count. -When the last non-weak reference to an object is deleted, the object -is destroyed and all the weak references to the object are -automatically undef-ed. +=item * -To use this feature, you need the WeakRef package from CPAN, which -contains additional documentation. +B::Concise, by Stephen McCamant, is a new compiler backend for +walking the Perl syntax tree, printing concise info about ops. +The output is highly customisable. -=head2 File globbing implemented internally +See L for more information. - WARNING: This is currently an experimental feature. Interfaces and - implementation are likely to change. +=item * -Perl now uses the File::Glob implementation of the glob() operator -automatically. This avoids using an external csh process and the -problems associated with it. +Class::ISA, by Sean Burke, for reporting the search path for a +class's ISA tree, has been added. -=head2 Binary numbers supported +See L for more information. -Binary numbers are now supported as literals, in s?printf formats, and -C: +=item * - $answer = 0b101010; - printf "The answer is: %b\n", oct("0b101010"); +Cwd has now a split personality: if possible, an extension is used, +(this will hopefully be both faster and more secure and robust) but +if not possible, the familiar Perl library implementation is used. -=head2 Some arrows may be omitted in calls through references +=item * -Perl now allows the arrow to be omitted in many constructs -involving subroutine calls through references. For example, -C<< $foo[10]->('foo') >> may now be written C<$foo[10]('foo')>. -This is rather similar to how the arrow may be omitted from -C<< $foo[10]->{'foo'} >>. Note however, that the arrow is still -required for C<< foo(10)->('bar') >>. +Digest, a frontend module for calculating digests (checksums), +from Gisle Aas, has been added. -=head2 exists() is supported on subroutine names +See L for more information. -The exists() builtin now works on subroutine names. A subroutine -is considered to exist if it has been declared (even if implicitly). -See L for examples. +=item * -=head2 exists() and delete() are supported on array elements +Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas, +has been added. -The exists() and delete() builtins now work on simple arrays as well. -The behavior is similar to that on hash elements. + use Digest::MD5 'md5_hex'; -exists() can be used to check whether an array element has been -initialized. This avoids autovivifying array elements that don't exist. -If the array is tied, the EXISTS() method in the corresponding tied -package will be invoked. + $digest = md5_hex("Thirsty Camel"); -delete() may be used to remove an element from the array and return -it. The array element at that position returns to its unintialized -state, so that testing for the same element with exists() will return -false. If the element happens to be the one at the end, the size of -the array also shrinks up to the highest element that tests true for -exists(), or 0 if none such is found. If the array is tied, the DELETE() -method in the corresponding tied package will be invoked. + print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1 -See L and L for examples. +NOTE: the MD5 backward compatibility module is deliberately not +included since its use is discouraged. -=head2 syswrite() ease-of-use +See L for more information. -The length argument of C has become optional. +=item * -=head2 File and directory handles can be autovivified +Encode, by Nick Ing-Simmons, provides a mechanism to translate +between different character encodings. Support for Unicode, +ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are +compiled in to the module. Several other encodings (like Japanese, +Chinese, and MacIntosh encodings) are included and will be loaded at +runtime. -Similar to how constructs such as C<< $x->[0] >> autovivify a reference, -handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(), -socket(), and accept()) now autovivify a file or directory handle -if the handle passed to them is an uninitialized scalar variable. This -allows the constructs such as C and C -to be used to create filehandles that will conveniently be closed -automatically when the scope ends, provided there are no other references -to them. This largely eliminates the need for typeglobs when opening -filehandles that must be passed around, as in the following example: +Any encoding supported by Encode module is also available to the +":encoding()" layer if PerlIO is used. - sub myopen { - open my $fh, "@_" - or die "Can't open '@_': $!"; - return $fh; - } +See L for more information. - { - my $f = myopen("; - # $f implicitly closed here - } +=item * -=head2 open() with more than two arguments +Filter::Simple is an easy-to-use frontend to Filter::Util::Call, +from Damian Conway. -If open() is passed three arguments instead of two, the second arguments -is used as the mode and the third argument is taken to be the file name. -This is primarily useful for protecting against unintended magic behavior -of the traditional two-argument form. See L. + # in MyFilter.pm: -=head2 64-bit support + package MyFilter; - WARNING: 64-bit support is still experimental on most platforms. - Existing support only covers the LP64 data model. In particular, the - LLP64 data model is not yet supported. 64-bit libraries and system - APIs on many platforms have not stabilized--your mileage may vary. + use Filter::Simple sub { + while (my ($from, $to) = splice @_, 0, 2) { + s/$from/$to/g; + } + }; -Any platform that has 64-bit integers either + 1; - (1) natively as longs or ints - (2) via special compiler flags - (3) using long long or int64_t + # in user's code: -are able to use "quads" (64-bit integers) as follows: + use MyFilter qr/red/ => 'green'; - NOTE: The Configure flags -Duselonglong and -Duse64bits have been - deprecated. Use -Duse64bitint instead. + print "red\n"; # this code is filtered, will print "green\n" + print "bored\n"; # this code is filtered, will print "bogreen\n" -=over 4 + no MyFilter; -=item * + print "red\n"; # this code is not filtered, will print "red\n" -constants (decimal, hexadecimal, octal, binary) in the code +See L for more information. =item * -arguments to oct() and hex() +Filter::Util::Call, by Paul Marquess, provides you with the +framework to write I in Perl. For most uses +the frontend Filter::Simple is to be preferred. +See L for more information. =item * -arguments to print(), printf() and sprintf() (flag prefixes ll, L, q) +Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language, +from Neil Bowers, have been added. They provide the codes for various +locale standards, such as "fr" for France, "usd" for US Dollar, and +"jp" for Japanese. -=item * + use Locale::Country; -printed as such + $country = code2country('jp'); # $country gets 'Japan' + $code = country2code('Norway'); # $code gets 'no' + +See L, L, L, +and L for more information. =item * -pack() and unpack() "q" and "Q" formats +MIME::Base64, by Gisle Aas, allows you to encode data in base64. -=item * + use MIME::Base64; -in basic arithmetics: + - * / % (NOTE: operating close to the limits -of the integer values may produce surprising results) + $encoded = encode_base64('Aladdin:open sesame'); + $decoded = decode_base64($encoded); -=item * + print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" -in bit arithmetics: & | ^ ~ << >> (NOTE: these used to be forced -to be 32 bits wide but now operate on the full native width.) +See L for more information. =item * -vec() +MIME::QuotedPrint, by Gisle Aas, allows you to encode data in +quoted-printable encoding. -=back - -Note that unless you have the case (a) you will have to configure -and compile Perl using the -Duse64bitint Configure flag. - -There are actually two modes of 64-bitness: the first one is achieved -using Configure -Duse64bitint and the second one using Configure --Duse64bitall. The difference is that the first one is minimal and -the second one maximal. The first works in more places than the second. + use MIME::QuotedPrint; -The C does only as much as is required to get 64-bit -integers into Perl (this may mean, for example, using "long longs") -while your memory may still be limited to 2 gigabytes (because your -pointers could still be 32-bit). Note that the name C<64bitint> does -not imply that your C compiler will be using 64-bit Cs (it might, -but it doesn't have to): the C means that you will be -able to have 64 bits wide scalar values. + $encoded = encode_qp("Smiley in Unicode: \x{263a}"); + $decoded = decode_qp($encoded); -The C goes all the way by attempting to switch also -integers (if it can), longs (and pointers) to being 64-bit. This may -create an even more binary incompatible Perl than -Duse64bitint: the -resulting executable may not run at all in a 32-bit box, or you may -have to reboot/reconfigure/rebuild your operating system to be 64-bit -aware. + print $encoded, "\n"; # "Smiley in Unicode: =263A" -Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint -nor -Duse64bitall. +MIME::QuotedPrint has been enhanced to provide the basic methods +necessary to use it with PerlIO::Via as in : -Last but not least: note that due to Perl's habit of always using -floating point numbers, the quads are still not true integers. -When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned, --9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they -are silently promoted to floating point numbers, after which they will -start losing precision (in their lower digits). + use MIME::QuotedPrint; + open($fh,">Via(MIME::QuotedPrint)",$path) -=head2 Large file support +See L for more information. -If you have filesystems that support "large files" (files larger than -2 gigabytes), you may now also be able to create and access them from -Perl. NOTE: the default action is to use the large file support, if -available on the platform. +=item * -If the large file support is on, and you have a Fcntl constant -O_LARGEFILE, the O_LARGEFILE is automatically added to the flags -of sysopen(). +PerlIO::Scalar, by Nick Ing-Simmons, provides the implementation of +IO to "in memory" Perl scalars as discussed above. It also serves as +an example of a loadable layer. Other future possibilities include +PerlIO::Array and PerlIO::Code. See L for more +information. -Beware: unless your filesystem also supports "sparse files" seeking to -umpteen petabytes may be unadvisable. +=item * -Note that in addition to requiring a proper file system to do large -files you may also need to adjust your per-process (or your -per-system, or per-process-group, or per-user-group) maximum filesize -limits before running Perl scripts that try to handle large files, -especially if you intend to write such files. +PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps +PerlIO layer functionality provided by a class (typically implemented +in perl code). -Finally, in addition to your process/process group maximum filesize -limits, you may have quota limits on your filesystems that stop you -(your user id or your user group id) from using large files. + use MIME::QuotedPrint; + open($fh,">Via(MIME::QuotedPrint)",$path) -Adjusting your process/user/group/file system/operating system limits -is outside the scope of Perl core language. For process limits, you -may try increasing the limits using your shell's limits/limit/ulimit -command before running Perl. The BSD::Resource extension (not -included with the standard Perl distribution) may also be of use, it -offers the getrlimit/setrlimit interface that can be used to adjust -process resource usage limits, including the maximum filesize limit. +This will automatically convert everything output to C<$fh> +to Quoted-Printable. See L for more information. -=head2 Long doubles +=item * -In some systems you may be able to use long doubles to enhance the -range and precision of your double precision floating point numbers -(that is, Perl's numbers). Use Configure -Duselongdouble to enable -this support (if it is available). +Pod::Text::Overstrike, by Joe Smith, has been added. +It converts POD data to formatted overstrike text. +See L for more information. -=head2 "more bits" +=item * -You can "Configure -Dusemorebits" to turn on both the 64-bit support -and the long double support. +Switch from Damian Conway has been added. Just by saying -=head2 Enhanced support for sort() subroutines + use Switch; -Perl subroutines with a prototype of C<($$)>, and XSUBs in general, can -now be used as sort subroutines. In either case, the two elements to -be compared are passed as normal parameters in @_. See L. +you have C and C available in Perl. -For unprototyped sort subroutines, the historical behavior of passing -the elements to be compared as the global variables $a and $b remains -unchanged. + use Switch; -=head2 Better syntax checks on parenthesized unary operators + switch ($val) { -Expressions such as: + case 1 { print "number 1" } + case "a" { print "string a" } + case [1..10,42] { print "number in list" } + case (@array) { print "number in list" } + case /\w+/ { print "pattern" } + case qr/\w+/ { print "pattern" } + case (%hash) { print "entry in hash" } + case (\%hash) { print "entry in hash" } + case (\&sub) { print "arg to subroutine" } + else { print "previous case not true" } + } - print defined(&foo,&bar,&baz); - print uc("foo","bar","baz"); - undef($foo,&bar); +See L for more information. -used to be accidentally allowed in earlier versions, and produced -unpredictable behaviour. Some produced ancillary warnings -when used in this way; others silently did the wrong thing. +=item * -The parenthesized forms of most unary operators that expect a single -argument now ensure that they are not called with more than one -argument, making the cases shown above syntax errors. The usual -behaviour of: +Text::Balanced from Damian Conway has been added, for +extracting delimited text sequences from strings. - print defined &foo, &bar, &baz; - print uc "foo", "bar", "baz"; - undef $foo, &bar; + use Text::Balanced 'extract_delimited'; -remains unchanged. See L. + ($a, $b) = extract_delimited("'never say never', he never said", "'", ''); -=head2 POSIX character class syntax [: :] supported +$a will be "'never say never'", $b will be ', he never said'. -For example to match alphabetic characters use /[[:alpha:]]/. -See L for details. +In addition to extract_delimited() there are also extract_bracketed(), +extract_quotelike(), extract_codeblock(), extract_variable(), +extract_tagged(), extract_multiple(), gen_delimited_pat(), and +gen_extract_tagged(). With these you can implement rather advanced +parsing algorithms. See L for more information. -=head2 Improved C operator +=item * -The C operator is now evaluated at compile time into a true list -instead of being replaced with a run time call to C. This -removes the confusing misbehaviour of C in scalar context, which -had inherited that behaviour from split(). +Tie::RefHash::Nestable, by Edward Avis, allows storing hash references +(unlike the standard Tie::RefHash) The module is contained within +Tie::RefHash. -Thus: +=item * - $foo = ($bar) = qw(a b c); print "$foo|$bar\n"; +XS::Typemap, by Tim Jenness, is a test extension that exercises XS +typemaps. Nothing gets installed but for extension writers the code +is worth studying. -now correctly prints "3|a", instead of "2|a". +=item * -=head2 pack() format 'Z' supported +L - Simpler definition of attribute handlers -The new format type 'Z' is useful for packing and unpacking null-terminated -strings. See L. +=item * -=head2 pack() format modifier '!' supported +L - generate XS code to import C header constants -The new format type modifier '!' is useful for packing and unpacking -native shorts, ints, and longs. See L. +=item * -=head2 pack() and unpack() support counted strings +L - query locale information -The template character '/' can be used to specify a counted string -type to be packed or unpacked. See L. +=item * -=head2 Comments in pack() templates +L - functions for dealing with RFC3066-style language tags -The '#' character in a template introduces a comment up to -end of the line. This facilitates documentation of pack() -templates. +=item * -=head2 $^X variables may now have names longer than one character +L - a collection of perl5 modules related to network programming -Formerly, $^X was synonymous with ${"\cX"}, but $^XY was a syntax -error. Now variable names that begin with a control character may be -arbitrarily long. However, for compatibility reasons, these variables -I be written with explicit braces, as C<${^XY}> for example. -C<${^XYZ}> is synonymous with ${"\cXYZ"}. Variable names with more -than one control character, such as C<${^XY^Z}>, are illegal. +Perl installation leaves libnet unconfigured, use F to configure. -The old syntax has not changed. As before, `^X' may be either a -literal control-X character or the two-character sequence `caret' plus -`X'. When braces are omitted, the variable name stops after the -control character. Thus C<"$^XYZ"> continues to be synonymous with -C<$^X . "YZ"> as before. +=item * -As before, lexical variables may not have names beginning with control -characters. As before, variables whose names begin with a control -character are always forced to be in package `main'. All such variables -are reserved for future extensions, except those that begin with -C<^_>, which may be used by user programs and are guaranteed not to -acquire special meaning in any future version of Perl. +L - selection of general-utility list subroutines -=head2 C implicit in subroutine attributes +=item * -Formerly, if you wanted to mark a subroutine as being a method call or -as requiring an automatic lock() when it is entered, you had to declare -that with a C pragma in the body of the subroutine. -That can now be accomplished with declaration syntax, like this: +L - framework for localization - sub mymethod : locked method ; - ... - sub mymethod : locked method { - ... - } +=item * - sub othermethod :locked :method ; - ... - sub othermethod :locked :method { - ... - } +L - Make your functions faster by trading space for time +=item * -(Note how only the first C<:> is mandatory, and whitespace surrounding -the C<:> is optional.) +L - pseudo-class for method redispatch -F and F have been updated to keep the attributes -with the stubs they provide. See L. +=item * -=head2 Support for interpolating named characters +L - selection of general-utility scalar subroutines -The new C<\N> escape interpolates named characters within strings. -For example, C<"Hi! \N{WHITE SMILING FACE}"> evaluates to a string -with a unicode smiley face at the end. +=item * -=head2 C and C may be overridden +L - yet another framework for writing test scripts -C and C operations may be overridden locally -by importing subroutines of the same name into the current package -(or globally by importing them into the CORE::GLOBAL:: namespace). -Overriding C will also affect C, provided the override -is visible at compile-time. -See L. +=item * -=head2 New variable $^C reflects C<-c> switch +L - Basic utilities for writing tests -C<$^C> has a boolean value that reflects whether perl is being run -in compile-only mode (i.e. via the C<-c> switch). Since -BEGIN blocks are executed under such conditions, this variable -enables perl code to determine whether actions that make sense -only during normal running are warranted. See L. +=item * -=head2 New variable $^V contains Perl version as a string +L - high resolution ualarm, usleep, and gettimeofday -C<$^V> contains the Perl version number as a string composed of -characters whose ordinals match the version numbers, i.e. v5.6.0. -This may be used in string comparisons. +=item * -See C for an -example. +L - Object Oriented time objects -=head2 Optional Y2K warnings +(Previously known as L.) -If Perl is built with the cpp macro C defined, -it emits optional warnings when concatenating the number 19 -with another number. +=item * -This behavior must be specifically enabled when running Configure. -See F and F. +L - a simple API to convert seconds to other date values -=head1 Significant bug fixes +=item * -=head2 on empty files +L - Unicode Character Database -With C<$/> set to C, "slurping" an empty file returns a string of -zero length (instead of C, as it used to) the first time the -HANDLE is read after C<$/> is set to C. Further reads yield -C. +=back -This means that the following will append "foo" to an empty file (it used -to do nothing): +=head2 Updated And Improved Modules and Pragmata - perl -0777 -pi -e 's/^/foo/' empty_file +=over 4 -The behaviour of: +=item * - perl -pi -e 's/^/foo/' empty_file +The following independently supported modules have been updated to +newer versions from CPAN: CGI, CPAN, DB_File, File::Spec, Getopt::Long, +the podlators bundle, Pod::LaTeX, Pod::Parser, Term::ANSIColor, Test. -is unchanged (it continues to leave the file empty). +=item * -=head2 C improvements +Bug fixes and minor enhancements have been applied to B::Deparse, +Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat, +Math::Complex, Math::Trig, Net::protoent, the re pragma, SelfLoader, +Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and the warnings +pragma. -Line numbers (as reflected by caller() and most diagnostics) within -C were often incorrect where here documents were involved. -This has been corrected. +=item * -Lexical lookups for variables appearing in C within -functions that were themselves called within an C were -searching the wrong place for lexicals. The lexical search now -correctly ends at the subroutine's block boundary. +The attributes::reftype() now works on tied arguments. -Parsing of here documents used to be flawed when they appeared as -the replacement expression in C. This has -been fixed. +=item * -=head2 All compilation errors are true errors +AutoLoader can now be disabled with C, -Some "errors" encountered at compile time were by neccessity -generated as warnings followed by eventual termination of the -program. This enabled more such errors to be reported in a -single run, rather than causing a hard stop at the first error -that was encountered. +=item * -The mechanism for reporting such errors has been reimplemented -to queue compile-time errors and report them at the end of the -compilation as true errors rather than as warnings. This fixes -cases where error messages leaked through in the form of warnings -when code was compiled at run time using C, and -also allows such errors to be reliably trapped using C. +The English module can now be used without the infamous performance +hit by saying -=head2 Automatic flushing of output buffers + use English '-no_performance_hit'; -fork(), exec(), system(), qx//, and pipe open()s now flush buffers -of all files opened for output when the operation was attempted. This -mostly eliminates confusing buffering mishaps suffered by users unaware -of how Perl internally handles I/O. +(Assuming, of course, that one doesn't need the troublesome variables +C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and +C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>. -This is not supported on some platforms like Solaris where a suitably -correct implementation of fflush(NULL) isn't available. +=item * -=head2 Better diagnostics on meaningless filehandle operations +File::Find now has pre- and post-processing callbacks. It also +correctly changes directories when chasing symbolic links. Callbacks +(naughtily) exiting with "next;" instead of "return;" now work. -Constructs such as C<< open() >> and C<< close() >> -are compile time errors. Attempting to read from filehandles that -were opened only for writing will now produce warnings (just as -writing to read-only filehandles does). +=item * -=head2 Where possible, buffered data discarded from duped input filehandle +File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid +prototype mismatch with CORE::glob(). -C<< open(NEW, "<&OLD") >> now attempts to discard any data that -was previously read and buffered in C before duping the handle. -On platforms where doing this is allowed, the next read operation -on C will return the same data as the corresponding operation -on C. Formerly, it would have returned the data from the start -of the following disk block instead. +=item * -=head2 eof() has the same old magic as <> +IPC::Open3 now allows the use of numeric file descriptors. -C would return true if no attempt to read from C<< <> >> had -yet been made. C has been changed to have a little magic of its -own, it now opens the C<< <> >> files. +=item * -=head2 system(), backticks and pipe open now reflect exec() failure +use lib now works identically to @INC. Removing directories +with 'no lib' now works. -On Unix and similar platforms, system(), qx() and open(FOO, "cmd |") -etc., are implemented via fork() and exec(). When the underlying -exec() fails, earlier versions did not report the error properly, -since the exec() happened to be in a different process. +=item * -The child process now communicates with the parent about the -error in launching the external command, which allows these -constructs to return with their usual error value and set $!. +C<%INC> now localised in a Safe compartment so that use/require work. -=head2 Implicitly closed filehandles are safer +=item * -Sometimes implicitly closed filehandles (as when they are localized, -and Perl automatically closes them on exiting the scope) could -inadvertently set $? or $!. This has been corrected. +The Shell module now has an OO interface. -=head2 C<(\$)> prototype and C<$foo{a}> +=item * -A scalar reference prototype now correctly allows a hash or -array element in that slot. +B::Deparse should be now more robust. It still far from providing a full +round trip for any random piece of Perl code, though, and is under active +development: expect more robustness in 5.7.2. -=head2 Pseudo-hashes work better +=item * - WARNING: The pseudo-hash data type continues to be experimental. - Limiting oneself to the interface elements provided by the - fields pragma will provide protection from any future changes. +Class::Struct can now define the classes in compile time. -Dereferencing some types of reference values in a pseudo-hash, -such as C<< $ph->{foo}[1] >>, was accidentally disallowed. This has -been corrected. +=item * -When applied to a pseudo-hash element, exists() now reports whether -the specified value exists, not merely if the key is valid. +Math::BigFloat has undergone much fixing, and in addition the fmod() +function now supports modulus operations. -delete() now works on pseudo-hashes. When given a pseudo-hash element -or slice it deletes the values corresponding to the keys (but not the keys -themselves). See L. +(The fixed Math::BigFloat module is also available in CPAN for those +who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/) -Pseudo-hash slices with constant keys are now optimized to array lookups -at compile-time. +=item * -The C pragma now provides ways to create pseudo-hashes, via -fields::new() and fields::phash(). See L. +Devel::Peek now has an interface for the Perl memory statistics +(this works only if you are using perl's malloc, and if you have +compiled with debugging). -=head2 C and AUTOLOAD +=item * -The C construct works correctly when C<&sub> happens -to be autoloaded. +IO::Socket has now atmark() method, which returns true if the socket +is positioned at the out-of-band mark. The method is also exportable +as a sockatmark() function. -=head2 C<-bareword> allowed under C +=item * -The autoquoting of barewords preceded by C<-> did not work -in prior versions when the C pragma was enabled. -This has been fixed. +IO::Socket::INET has support for ReusePort option (if your platform +supports it). The Reuse option now has an alias, ReuseAddr. For clarity +you may want to prefer ReuseAddr. -=head2 Boolean assignment operators are legal lvalues +=item * -Constructs such as C<($a ||= 2) += 1> are now allowed. +Net::Ping has been enhanced. There is now "external" protocol which +uses Net::Ping::External module which runs external ping(1) and parses +the output. An alpha version of Net::Ping::External is available in +CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl. -=head2 C allowed +=item * -sort() did not accept a subroutine reference as the comparison -function in earlier versions. This is now permitted. +The C pragma allows layers other than ":raw" and ":crlf" when +using PerlIO. -=head2 Failures in DESTROY() +=item * -When code in a destructor threw an exception, it went unnoticed -in earlier versions of Perl, unless someone happened to be -looking in $@ just after the point the destructor happened to -run. Such failures are now visible as warnings when warnings are -enabled. +POSIX::sigaction() is now much more flexible and robust. +You can now install coderef handlers, 'DEFAULT', and 'IGNORE' +handlers, installing new handlers was not atomic. -=head2 Locale bugs fixed +=item * -printf() and sprintf() previously reset the numeric locale -back to the default "C" locale. This has been fixed. +The Test module has been significantly enhanced. Its use is +greatly recommended for module writers. -Numbers formatted according to the local numeric locale -(such as using a decimal comma instead of a decimal dot) caused -"isn't numeric" warnings, even while the operations accessing -those numbers produced correct results. These warnings have been -discontinued. +=item * -=head2 Memory leaks +The utf8:: name space (as in the pragma) provides various +Perl-callable functions to provide low level access to Perl's +internal Unicode representation. At the moment only length() +has been implemented. -The C construct could sometimes leak -memory. This has been fixed. +=back -Operations that aren't filehandle constructors used to leak memory -when used on invalid filehandles. This has been fixed. +The following modules have been upgraded from the versions at CPAN: +CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text, +Storable, Text-Tabs+Wrap. -Constructs that modified C<@_> could fail to deallocate values -in C<@_> and thus leak memory. This has been corrected. +=item * -=head2 Spurious subroutine stubs after failed subroutine calls +L module has been significantly enhanced. It now +can deparse almost all of the standard test suite (so that the +tests still succeed). There is a make target "test.deparse" +for trying this out. -Perl could sometimes create empty subroutine stubs when a -subroutine was not found in the package. Such cases stopped -later method lookups from progressing into base packages. -This has been corrected. +=item * -=head2 Taint failures under C<-U> +L now assigns the array/hash element if the accessor +is called with an array/hash element as the B argument. -When running in unsafe mode, taint violations could sometimes -cause silent failures. This has been fixed. +=item * -=head2 END blocks and the C<-c> switch +L extension is now (even) faster. -Prior versions used to run BEGIN B END blocks when Perl was -run in compile-only mode. Since this is typically not the expected -behavior, END blocks are not executed anymore when the C<-c> switch -is used. +=item * -See L for how to run things when the compile phase ends. +L extension has been updated to version 1.77. -=head2 Potential to leak DATA filehandles +=item * -Using the C<__DATA__> token creates an implicit filehandle to -the file that contains the token. It is the program's -responsibility to close it when it is done reading from it. +L, L, and L have been rewritten to use the +new-style constant dispatch section (see L). -This caveat is now better explained in the documentation. -See L. +=item * -=head2 Diagnostics follow STDERR +L is now (again) reentrant. It also has been made +more portable. -Diagnostic output now goes to whichever file the C handle -is pointing at, instead of always going to the underlying C runtime -library's C. +=item * -=head2 Other fixes for better diagnostics +L now supports C constant to limit the +size of the returned list of filenames. -Line numbers are no longer suppressed (under most likely circumstances) -during the global destruction phase. +=item * -Diagnostics emitted from code running in threads other than the main -thread are now accompanied by the thread ID. +L now supports C of zero (usually meaning +that the operating system will make one up.) -Embedded null characters in diagnostics now actually show up. They -used to truncate the message in prior versions. +=item * -$foo::a and $foo::b are now exempt from "possible typo" warnings only -if sort() is encountered in package C. +The L pragma now supports declaring fully qualified variables. +(Something that C does not and will not support.) -Unrecognized alphabetic escapes encountered when parsing quote -constructs now generate a warning, since they may take on new -semantics in later versions of Perl. +=back -Many diagnostics now report the internal operation in which the warning -was provoked, like so: +=head1 Utility Changes - Use of uninitialized value in concatenation (.) at (eval 1) line 1. - Use of uninitialized value in print at (eval 1) line 1. +=over 4 -Diagnostics that occur within eval may also report the file and line -number where the eval is located, in addition to the eval sequence -number and the line number within the evaluated text itself. For -example: +=item * - Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF +The Emacs perl mode (emacs/cperl-mode.el) has been updated to version +4.31. -=head1 Performance enhancements +=item * -=head2 Simple sort() using { $a <=> $b } and the like are optimized +Perlbug is now much more robust. It also sends the bug report to +perl.org, not perl.com. -Many common sort() operations using a simple inlined block are now -optimized for faster performance. +=item * -=head2 Optimized assignments to lexical variables +The perlcc utility has been rewritten and its user interface (that is, +command line) is much more like that of the UNIX C compiler, cc. -Certain operations in the RHS of assignment statements have been -optimized to directly set the lexical variable on the LHS, -eliminating redundant copying overheads. +=item * -=head2 Faster subroutine calls +The xsubpp utility for extension writers now understands POD +documentation embedded in the *.xs files. -Minor changes in how subroutine calls are handled internally -provide marginal improvements in performance. +=item * -=head1 Platform specific changes +h2xs now produces template README. -=head2 Supported platforms +=item * -=over 4 +s2p has been completely rewritten in Perl. (It is in fact a full +implementation of sed in Perl.) =item * -VM/ESA is now supported. +xsubpp now supports OUT keyword. =item * -Siemens BS2000 is now supported under the POSIX Shell. +The F is now much faster. =item * -The Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the Thread -extension. +L now supports C trigraphs. =item * -GNU/Hurd is now supported. +L uses the new L module which will affect +newly created extensions that define constants. Since the new code is +more correct (if you have two constants where the first one is a +prefix of the second one, the first constant B gets defined), +less lossy (it uses integers for integer constant, as opposed to the +old code that used floating point numbers even for integer constants), +and slightly faster, you might want to consider regenerating your +extension code (the new scheme makes regenerating easy). +L now also supports C trigraphs. =item * -Rhapsody/Darwin is now supported. +L has been added to configure the libnet. =item * -EPOC is is now supported (on Psion 5). +The F (and thusly L) now allows specifying +a cache directory. =back -=head2 DOS +=head1 New Documentation =over 4 =item * -Perl now works with djgpp 2.02 (and 2.03 alpha). +perl56delta details the changes between the 5.005 release and the +5.6.0 release. =item * -Environment variable names are not converted to uppercase any more. +perldebtut is a Perl debugging tutorial. =item * -Incorrect exit codes from backticks have been fixed. +perlebcdic contains considerations for running Perl on EBCDIC platforms. +Note that unfortunately EBCDIC platforms that used to supported back in +Perl 5.005 are still unsupported by Perl 5.7.0; the plan, however, is to +bring them back to the fold. =item * -This port continues to use its own builtin globbing (not File::Glob). +perlnewmod tells about writing and submitting a new module. -=back +=item * -=head2 OS390 (OpenEdition MVS) +perlposix-bc explains using Perl on the POSIX-BC platform +(an EBCDIC mainframe platform). -Support for this EBCDIC platform has not been renewed in this release. -There are difficulties in reconciling Perl's standardization on UTF-8 -as its internal representation for characters with the EBCDIC character -set, because the two are incompatible. +=item * -It is unclear whether future versions will renew support for this -platform, but the possibility exists. +perlretut is a regular expression tutorial. -=head2 VMS +=item * -Numerous revisions and extensions to configuration, build, testing, and -installation process to accomodate core changes and VMS-specific options. +perlrequick is a regular expressions quick-start guide. +Yes, much quicker than perlretut. -Expand %ENV-handling code to allow runtime mapping to logical names, -CLI symbols, and CRTL environ array. +=item * -Extension of subprocess invocation code to accept filespecs as command -"verbs". +perlutil explains the command line utilities packaged with the Perl +distribution. -Add to Perl command line processing the ability to use default file types and -to recognize Unix-style C<2E&1>. +=back -Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS. +=head2 perlclib -Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly. +Internal replacements for standard C library functions. +(Interesting only for extension writers and Perl core hackers.) -Barewords at start of Unix-syntax paths may be treated as text rather than -only as logical names. +=head2 perliol -Optional secure translation of several logical names used internally by Perl. +Internals of PerlIO with layers. -Miscellaneous bugfixing and porting of new core code to VMS. +=head2 README.aix -Thanks are gladly extended to the many people who have contributed VMS -patches, testing, and ideas. +Documentation on compiling Perl on AIX has been added. AIX has +several different C compilers and getting the right patch level +is essential. On install README.aix will be installed as L. -=head2 Win32 +=head2 README.bs2000 -Perl can now emulate fork() internally, using multiple interpreters running -in different concurrent threads. This support must be enabled at build -time. See L for detailed information. +Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC +mainframe environment) has been added. -When given a pathname that consists only of a drivename, such as C, -opendir() and stat() now use the current working directory for the drive -rather than the drive root. +This was formerly known as README.posix-bc but the name was considered +to be too confusing (it has nothing to do with the POSIX module or the +POSIX standard). On install README.bs2000 will be installed as L. -The builtin XSUB functions in the Win32:: namespace are documented. See -L. +=head2 README.macos -$^X now contains the full path name of the running executable. +In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been +synchronised with the standard Perl sources. To compile MacPerl +some additional steps are required, and this file documents those +steps. On install README.macos will be installed as L. -A Win32::GetLongPathName() function is provided to complement -Win32::GetFullPathName() and Win32::GetShortPathName(). See L. +=head2 README.mpeix -POSIX::uname() is supported. +The README.mpeix has been podified, which means that this information +about compiling and using Perl on the MPE/iX miniframe platform will +be installed as L. -system(1,...) now returns true process IDs rather than process -handles. kill() accepts any real process id, rather than strictly -return values from system(1,...). +=head2 README.solaris -For better compatibility with Unix, C can now be used to -test whether a process exists. +README.solaris has been created and Solaris wisdom from elsewhere +in the Perl documentation has been collected there. On install +README.solaris will be installed as L. -The C module is supported. +=head2 README.vos -Better support for building Perl under command.com in Windows 95 -has been added. +The README.vos has been podified, which means that this information +about compiling and using Perl on the Stratus VOS miniframe platform +will be installed as L. -Scripts are read in binary mode by default to allow ByteLoader (and -the filter mechanism in general) to work properly. For compatibility, -the DATA filehandle will be set to text mode if a carriage return is -detected at the end of the line containing the __END__ or __DATA__ -token; if not, the DATA filehandle will be left open in binary mode. -Earlier versions always opened the DATA filehandle in text mode. +=head2 Porting/repository.pod -The glob() operator is implemented via the C extension, -which supports glob syntax of the C shell. This increases the flexibility -of the glob() operator, but there may be compatibility issues for -programs that relied on the older globbing syntax. If you want to -preserve compatibility with the older syntax, you might want to run -perl with C<-MFile::DosGlob>. For details and compatibility information, -see L. - -=head1 New tests +Documentation on how to use the Perl source repository has been added. =over 4 -=item lib/attrs - -Compatibility tests for C vs the older C. - -=item lib/env - -Tests for new environment scalar capability (e.g., C). - -=item lib/env-array - -Tests for new environment array capability (e.g., C). +=item * -=item lib/io_const +L is an article about software localization, +originally published in The Perl Journal #13, republished here with +kind permission. -IO constants (SEEK_*, _IO*). +=item * -=item lib/io_dir +More README.$PLATFORM files have been converted into pod, which also +means that they also be installed as perl$PLATFORM documentation +files. The new files are L, L, L, +L, L, L, L, L, +and L. -Directory-related IO methods (new, read, close, rewind, tied delete). +=item * -=item lib/io_multihomed +The F and F files have been merged into L. -INET sockets with multi-homed hosts. +=item * -=item lib/io_poll +Use of the F tool to profile Perl has been documented in +L. There is a make target "perl.gprof" for generating a +gprofiled Perl executable. -IO poll(). +=back -=item lib/io_unix +=head1 Performance Enhancements -UNIX sockets. +=over 4 -=item op/attrs +=item * -Regression tests for C and . +map() that changes the size of the list should now work faster. -=item op/filetest +=item * -File test operators. +sort() has been changed to use mergesort internally as opposed to the +earlier quicksort. For very small lists this may result in slightly +slower sorting times, but in general the speedup should be at least +20%. Additional bonuses are that the worst case behaviour of sort() +is now better (in computer science terms it now runs in time O(N log N), +as opposed to quicksort's Theta(N**2) worst-case run time behaviour), +and that sort() is now stable (meaning that elements with identical +keys will stay ordered as they were before the sort). -=item op/lex_assign +=item * -Verify operations that access pad objects (lexicals and temporaries). +Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm +(http://burtleburtle.net/bob/hash/doobs.html). This algorithm is +reasonably fast while producing a much better spread of values than +the old hashing algorithm (originally by Chris Torek, later tweaked by +Ilya Zakharevich). Hash values output from the algorithm on a hash of +all 3-char printable ASCII keys comes much closer to passing the +DIEHARD random number generation tests. According to perlbench, this +change has not affected the overall speed of Perl. -=item op/exists_sub +=item * -Verify C operations. +unshift() should now be noticeably faster. =back -=head1 Modules and Pragmata +=head1 Installation and Configuration Improvements -=head2 Modules +=head2 Generic Improvements =over 4 -=item attributes - -While used internally by Perl as a pragma, this module also -provides a way to fetch subroutine and variable attributes. -See L. - -=item B - - WARNING: The Compiler suite remains highly experimental. The - generated code may not be correct, even it manages to execute - without errors. - -The Perl Compiler suite has been extensively reworked for this -release. More of the standard Perl testsuite passes when run -under the Compiler, but there is still a significant way to -go to achieve production quality compiled executables. - -=item ByteLoader - -The ByteLoader is a dedicated extension to generate and run -Perl bytecode. See L. - -=item constant +=item * -References can now be used. +INSTALL now explains how you can configure Perl to use 64-bit +integers even on non-64-bit platforms. -The new version also allows a leading underscore in constant names, but -disallows a double leading underscore (as in "__LINE__"). Some other names -are disallowed or warned against, including BEGIN, END, etc. Some names -which were forced into main:: used to fail silently in some cases; now they're -fatal (outside of main::) and an optional warning (inside of main::). -The ability to detect whether a constant had been set with a given name has -been added. +=item * -See L. +Policy.sh policy change: if you are reusing a Policy.sh file +(see INSTALL) and you use Configure -Dprefix=/foo/bar and in the old +Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of +them will now be changed to the new prefix, /foo/bar. (Previously +only $prefix changed.) If you do not like this new behaviour, +specify prefix, siteprefix, and vendorprefix explicitly. -=item charnames +=item * -This pragma implements the C<\N> string escape. See L. +A new optional location for Perl libraries, otherlibdirs, is available. +It can be used for example for vendor add-ons without disturbing Perl's +own library directories. -=item Data::Dumper +=item * -A C setting can be specified to avoid venturing -too deeply into deep data structures. See L. +In many platforms the vendor-supplied 'cc' is too stripped-down to +build Perl (basically, 'cc' doesn't do ANSI C). If this seems +to be the case and 'cc' does not seem to be the GNU C compiler +'gcc', an automatic attempt is made to find and use 'gcc' instead. -The XSUB implementation of Dump() is now automatically called if the -C setting is not in use. +=item * -Dumping C objects works correctly. +gcc needs to closely track the operating system release to avoid +build problems. If Configure finds that gcc was built for a different +operating system release than is running, it now gives a clearly visible +warning that there may be trouble ahead. -=item DB +=item * -C is an experimental module that exposes a clean abstraction -to Perl's debugging API. +If binary compatibility with the 5.005 release is not wanted, Configure +no longer suggests including the 5.005 modules in @INC. -=item DB_File +=item * -DB_File can now be built with Berkeley DB versions 1, 2 or 3. -See C. +Configure C<-S> can now run non-interactively. -=item Devel::DProf +=item * -Devel::DProf, a Perl source code profiler has been added. See -L and L. +configure.gnu now works with options with whitespace in them. -=item Dumpvalue +=item * -The Dumpvalue module provides screen dumps of Perl data. +installperl now outputs everything to STDERR. -=item DynaLoader +=item * -DynaLoader now supports a dl_unload_file() function on platforms that -support unloading shared objects using dlclose(). +$Config{byteorder} is now computed dynamically (this is more robust +with "fat binaries" where an executable image contains binaries for +more than one binary platform.) -Perl can also optionally arrange to unload all extension shared objects -loaded by Perl. To enable this, build Perl with the Configure option -C<-Accflags=-DDL_UNLOAD_ALL_AT_EXIT>. (This maybe useful if you are -using Apache with mod_perl.) +=item * -=item Benchmark +Because PerlIO is now the default on most platforms, "-perlio" doesn't +get appended to the $Config{archname} (also known as $^O) anymore. +Instead, if you explicitly choose not to use perlio (Configure command +line option -Uuseperlio), you will get "-stdio" appended. -Overall, Benchmark results exhibit lower average error and better timing -accuracy. +=item * -You can now run tests for I seconds instead of guessing the right -number of tests to run: e.g., timethese(-5, ...) will run each -code for at least 5 CPU seconds. Zero as the "number of repetitions" -means "for at least 3 CPU seconds". The output format has also -changed. For example: +Another change related to the architecture name is that "-64all" +(-Duse64bitall, or "maximally 64-bit") is appended only if your +pointers are 64 bits wide. (To be exact, the use64bitall is ignored.) - use Benchmark;$x=3;timethese(-5,{a=>sub{$x*$x},b=>sub{$x**2}}) +=item * -will now output something like this: +APPLLIB_EXP, a less-know configuration-time definition, has been +documented. It can be used to prepend site-specific directories +to Perl's default search path (@INC), see INSTALL for information. - Benchmark: running a, b, each for at least 5 CPU seconds... - a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516) - b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686) +=item * -New features: "each for at least N CPU seconds...", "wallclock secs", -and the "@ operations/CPU second (n=operations)". +Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM +has been documented in INSTALL. -timethese() now returns a reference to a hash of Benchmark objects containing -the test results, keyed on the names of the tests. +=item * -timethis() now returns the iterations field in the Benchmark result object -instead of 0. +If you are on IRIX or Tru64 platforms, new profiling/debugging options +have been added, see L for more information about pixie and +Third Degree. -timethese(), timethis(), and the new cmpthese() (see below) can also take -a format specifier of 'none' to suppress output. +=item * -A new function countit() is just like timeit() except that it takes a -TIME instead of a COUNT. +In AFS installations one can configure the root of the AFS to be +somewhere else than the default F by using the Configure +parameter C<-Dafsroot=/some/where/else>. -A new function cmpthese() prints a chart comparing the results of each test -returned from a timethese() call. For each possible pair of tests, the -percentage speed difference (iters/sec or seconds/iter) is shown. +=item * -For other details, see L. +The version of Berkeley DB used when the Perl (and, presumably, the +DB_File extension) was built is now available as +C<@Config{qw(db_version_major db_version_minor db_version_patch)}> +from Perl and as C from C. -=item Devel::Peek +=item * -The Devel::Peek module provides access to the internal representation -of Perl variables and data. It is a data debugging tool for the XS programmer. +The Thread extension is now not built at all under ithreads +(C) because it wouldn't work anyway (the +Thread extension requires being Configured with C<-Duse5005threads>). -=item English +=item * -$PERL_VERSION now stands for C<$^V> (a string value) rather than for C<$]> -(a numeric value). +The C compiler backend has been so significantly improved +that almost the whole Perl test suite passes after being deparsed. A +make target has been added to help in further testing: C. -=item Env +=back -Env now supports accessing environment variables like PATH as array -variables. +=head2 New Or Improved Platforms -=item Fcntl +For the list of platforms known to support Perl, +see L. -More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for -large file (more than 4GB) access (NOTE: the O_LARGEFILE is -automatically added to sysopen() flags if large file support has been -configured, as is the default), Free/Net/OpenBSD locking behaviour -flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined -mask of O_RDONLY, O_WRONLY, and O_RDWR. The seek()/sysseek() -constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the -C<:seek> tag. The chmod()/stat() S_IF* constants and S_IS* functions -are available via the C<:mode> tag. +=over 4 -=item File::Compare +=item * -A compare_text() function has been added, which allows custom -comparison functions. See L. +AIX dynamic loading should be now better supported. -=item File::Find +=item * -File::Find now works correctly when the wanted() function is either -autoloaded or is a symbolic reference. +After a long pause, AmigaOS has been verified to be happy with Perl. -A bug that caused File::Find to lose track of the working directory -when pruning top-level directories has been fixed. +=item * -File::Find now also supports several other options to control its -behavior. It can follow symbolic links if the C option is -specified. Enabling the C option will make File::Find skip -changing the current directory when walking directories. The C -flag can be useful when running with taint checks enabled. +EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA) +have been regained. Many test suite tests still fail and the +co-existence of Unicode and EBCDIC isn't quite settled, but the +situation is much better than with Perl 5.6. See L, +L (for POSIX-BC), and L for more information. -See L. +=item * -=item File::Glob +Building perl with -Duseithreads or -Duse5005threads now works under +HP-UX 10.20 (previously it only worked under 10.30 or later). You will +need a thread library package installed. See README.hpux. -This extension implements BSD-style file globbing. By default, -it will also be used for the internal implementation of the glob() -operator. See L. +=item * -=item File::Spec +MacOS Classic (MacPerl has of course been available since +perl 5.004 but now the source code bases of standard Perl +and MacPerl have been synchronised) -New methods have been added to the File::Spec module: devnull() returns -the name of the null device (/dev/null on Unix) and tmpdir() the name of -the temp directory (normally /tmp on Unix). There are now also methods -to convert between absolute and relative filenames: abs2rel() and -rel2abs(). For compatibility with operating systems that specify volume -names in file paths, the splitpath(), splitdir(), and catdir() methods -have been added. +=item * -=item File::Spec::Functions +NCR MP-RAS is now supported. -The new File::Spec::Functions modules provides a function interface -to the File::Spec module. Allows shorthand +=item * - $fullname = catfile($dir1, $dir2, $file); +NonStop-UX is now supported. -instead of +=item * - $fullname = File::Spec->catfile($dir1, $dir2, $file); +Amdahl UTS is now supported. -=item Getopt::Long +=item * -Getopt::Long licensing has changed to allow the Perl Artistic License -as well as the GPL. It used to be GPL only, which got in the way of -non-GPL applications that wanted to use Getopt::Long. +z/OS (formerly known as OS/390, formerly known as MVS OE) has now +support for dynamic loading. This is not selected by default, +however, you must specify -Dusedl in the arguments of Configure. -Getopt::Long encourages the use of Pod::Usage to produce help -messages. For example: +=item * - use Getopt::Long; - use Pod::Usage; - my $man = 0; - my $help = 0; - GetOptions('help|?' => \$help, man => \$man) or pod2usage(2); - pod2usage(1) if $help; - pod2usage(-exitstatus => 0, -verbose => 2) if $man; +AIX should now work better with gcc, threads, and 64-bitness. Also the +long doubles support in AIX should be better now. See L. - __END__ +=item * - =head1 NAME +AtheOS (http://www.atheos.cx/) is a new platform. - sample - Using GetOpt::Long and Pod::Usage +=item * - =head1 SYNOPSIS +DG/UX platform now supports the 5.005-style threads. See L. - sample [options] [file ...] +=item * - Options: - -help brief help message - -man full documentation +DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near osvers 4.5.2. - =head1 OPTIONS +=item * - =over 8 +Several MacOS (Classic) portability patches have been applied. We +hope to get a fully working port by 5.8.0. (The remaining problems +relate to the changed IO model of Perl.) See L. - =item B<-help> +=item * - Print a brief help message and exits. +MacOS X (or Darwin) should now be able to build Perl even on HFS+ +filesystems. (The case-insensitivity confused the Perl build process.) - =item B<-man> +=item * - Prints the manual page and exits. +NetWare from Novell is now supported. See L. - =back +=item * - =head1 DESCRIPTION +The Amdahl UTS UNIX mainframe platform is now supported. - B will read the given input file(s) and do someting - useful with the contents thereof. +=back - =cut +=head1 Selected Bug Fixes -See L for details. +=over 4 -A bug that prevented the non-option call-back <> from being -specified as the first argument has been fixed. +=item * -To specify the characters < and > as option starters, use ><. Note, -however, that changing option starters is strongly deprecated. +Several debugger fixes: exit code now reflects the script exit code, +condition C<"0"> now treated correctly, the C command now checks +line number, the C<$.> no longer gets corrupted, all debugger output now +goes correctly to the socket if RemotePort is set. -=item IO +=item * -write() and syswrite() will now accept a single-argument -form of the call, for consistency with Perl's syswrite(). +C<*foo{FORMAT}> now works. -You can now create a TCP-based IO::Socket::INET without forcing -a connect attempt. This allows you to configure its options -(like making it non-blocking) and then call connect() manually. +=item * -A bug that prevented the IO::Socket::protocol() accessor -from ever returning the correct value has been corrected. +Lexical warnings now propagating correctly between scopes. -IO::Socket::connect now uses non-blocking IO instead of alarm() -to do connect timeouts. +=item * -IO::Socket::accept now uses select() instead of alarm() for doing -timeouts. +Line renumbering with eval and C<#line> now works. -IO::Socket::INET->new now sets $! correctly on failure. $@ is -still set for backwards compatability. +=item * -=item JPL +Fixed numerous memory leaks, especially in eval "". -Java Perl Lingo is now distributed with Perl. See jpl/README -for more information. +=item * -=item lib +Modulus of unsigned numbers now works (4063328477 % 65535 used to +return 27406, instead of 27047). -C now weeds out any trailing duplicate entries. -C removes all named entries. +=item * -=item Math::BigInt +Some "not a number" warnings introduced in 5.6.0 eliminated to be +more compatible with 5.005. Infinity is now recognised as a number. -The bitwise operations C<<< << >>>, C<<< >> >>>, C<&>, C<|>, -and C<~> are now supported on bigints. +=item * -=item Math::Complex +our() variables will not cause "will not stay shared" warnings. -The accessor methods Re, Im, arg, abs, rho, and theta can now also -act as mutators (accessor $z->Re(), mutator $z->Re(3)). +=item * -The class method C and the corresponding object method -C, in addition to accepting just one argument, now can -also accept a parameter hash. Recognized keys of a parameter hash are -C<"style">, which corresponds to the old one parameter case, and two -new parameters: C<"format">, which is a printf()-style format string -(defaults usually to C<"%.15g">, you can revert to the default by -setting the format string to C) used for both parts of a -complex number, and C<"polar_pretty_print"> (defaults to true), -which controls whether an attempt is made to try to recognize small -multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a -polar complex number. +pack "Z" now correctly terminates the string with "\0". -The potentially disruptive change is that in list context both methods -now I, instead of only the value of the -C<"style"> parameter. +=item * -=item Math::Trig +Fix password routines which in some shadow password platforms +(e.g. HP-UX) caused getpwent() to return every other entry. -A little bit of radial trigonometry (cylindrical and spherical), -radial coordinate conversions, and the great circle distance were added. +=item * -=item Pod::Parser, Pod::InputObjects +printf() no longer resets the numeric locale to "C". -Pod::Parser is a base class for parsing and selecting sections of -pod documentation from an input stream. This module takes care of -identifying pod paragraphs and commands in the input and hands off the -parsed paragraphs and commands to user-defined methods which are free -to interpret or translate them as they see fit. +=item * -Pod::InputObjects defines some input objects needed by Pod::Parser, and -for advanced users of Pod::Parser that need more about a command besides -its name and text. +C now parses correctly as C<'a\\b'>. -As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned -"base parser code" recommended for use by all pod2xxx translators. -Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted -to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already -underway. For any questions or comments about pod parsing and translating -issues and utilities, please use the pod-people@perl.org mailing list. +=item * -For further information, please see L and L. +Printing quads (64-bit integers) with printf/sprintf now works +without the q L ll prefixes (assuming you are on a quad-capable platform). -=item Pod::Checker, podchecker +=item * -This utility checks pod files for correct syntax, according to -L. Obvious errors are flagged as such, while warnings are -printed for mistakes that can be handled gracefully. The checklist is -not complete yet. See L. +Regular expressions on references and overloaded scalars now work. -=item Pod::ParseUtils, Pod::Find +=item * -These modules provide a set of gizmos that are useful mainly for pod -translators. L traverses directory structures and -returns found pod files, along with their canonical names (like -C). L contains -B (useful for storing pod list information), B -(for parsing the contents of CE> sequences) and B -(for caching information about pod files, e.g., link nodes). +scalar() now forces scalar context even when used in void context. -=item Pod::Select, podselect +=item * -Pod::Select is a subclass of Pod::Parser which provides a function -named "podselect()" to filter out user-specified sections of raw pod -documentation from an input stream. podselect is a script that provides -access to Pod::Select from other scripts to be used as a filter. -See L. +sort() arguments are now compiled in the right wantarray context +(they were accidentally using the context of the sort() itself). -=item Pod::Usage, pod2usage +=item * -Pod::Usage provides the function "pod2usage()" to print usage messages for -a Perl script based on its embedded pod documentation. The pod2usage() -function is generally useful to all script authors since it lets them -write and maintain a single source (the pods) for documentation, thus -removing the need to create and maintain redundant usage message text -consisting of information already in the pods. +Changed the POSIX character class C<[[:space:]]> to include the (very +rare) vertical tab character. Added a new POSIX-ish character class +C<[[:blank:]]> which stands for horizontal whitespace (currently, +the space and the tab). -There is also a pod2usage script which can be used from other kinds of -scripts to print usage messages from pods (even for non-Perl scripts -with pods embedded in comments). +=item * -For details and examples, please see L. +$AUTOLOAD, sort(), lock(), and spawning subprocesses +in multiple threads simultaneously are now thread-safe. -=item Pod::Text and Pod::Man +=item * -Pod::Text has been rewritten to use Pod::Parser. While pod2text() is -still available for backwards compatibility, the module now has a new -preferred interface. See L for the details. The new Pod::Text -module is easily subclassed for tweaks to the output, and two such -subclasses (Pod::Text::Termcap for man-page-style bold and underlining -using termcap information, and Pod::Text::Color for markup with ANSI color -sequences) are now standard. +Allow read-only string on left hand side of non-modifying tr///. -pod2man has been turned into a module, Pod::Man, which also uses -Pod::Parser. In the process, several outstanding bugs related to quotes -in section headers, quoting of code escapes, and nested lists have been -fixed. pod2man is now a wrapper script around this module. +=item * -=item SDBM_File +Several Unicode fixes (but still not perfect). -An EXISTS method has been added to this module (and sdbm_exists() has -been added to the underlying sdbm library), so one can now call exists -on an SDBM_File tied hash and get the correct result, rather than a -runtime error. +=over 8 -A bug that may have caused data loss when more than one disk block -happens to be read from the database in a single FETCH() has been -fixed. +=item * -=item Sys::Syslog +BOMs (byte order marks) in the beginning of Perl files +(scripts, modules) should now be transparently skipped. +UTF-16 (UCS-2) encoded Perl files should now be read correctly. -Sys::Syslog now uses XSUBs to access facilities from syslog.h so it -no longer requires syslog.ph to exist. +=item * -=item Sys::Hostname +The character tables have been updated to Unicode 3.0.1. -Sys::Hostname now uses XSUBs to call the C library's gethostname() or -uname() if they exist. +=item * -=item Term::ANSIColor +chr() for values greater than 127 now create utf8 when under use +utf8. -Term::ANSIColor is a very simple module to provide easy and readable -access to the ANSI color and highlighting escape sequences, supported by -most ANSI terminal emulators. It is now included standard. +=item * -=item Time::Local +Comparing with utf8 data does not magically upgrade non-utf8 data into +utf8. -The timelocal() and timegm() functions used to silently return bogus -results when the date fell outside the machine's integer range. They -now consistently croak() if the date falls in an unsupported range. +=item * -=item Win32 +C, C, and C now match titlecase. -The error return value in list context has been changed for all functions -that return a list of values. Previously these functions returned a list -with a single element C if an error occurred. Now these functions -return the empty list in these situations. This applies to the following -functions: +=item * - Win32::FsType - Win32::GetOSVersion +Concatenation with the C<.> operator or via variable interpolation, +C, C, C, C, the C operator, +substitution with C, single-quoted UTF8, should now work--in +theory. -The remaining functions are unchanged and continue to return C on -error even in list context. +=item * -The Win32::SetLastError(ERROR) function has been added as a complement -to the Win32::GetLastError() function. +The C operator now works I better but is still rather +broken. Note that the C functionality has been removed (but +see pack('U0', ...)). -The new Win32::GetFullPathName(FILENAME) returns the full absolute -pathname for FILENAME in scalar context. In list context it returns -a two-element list containing the fully qualified directory name and -the filename. See L. +=item * -=item XSLoader +vec() now refuses to deal with characters >255. -The XSLoader extension is a simpler alternative to DynaLoader. -See L. +=item * -=item DBM Filters +Zero entries were missing from the Unicode classes like C. -A new feature called "DBM Filters" has been added to all the -DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File. -DBM Filters add four new methods to each DBM module: +=back - filter_store_key - filter_store_value - filter_fetch_key - filter_fetch_value +=item * -These can be used to filter key-value pairs before the pairs are -written to the database or just after they are read from the database. -See L for further information. +UNIVERSAL::isa no longer caches methods incorrectly. (This broke +the Tk extension with 5.6.0.) -=back +=item * -=head2 Pragmata +Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm) +when building the Perl binary. The only exception to this is SunOS 4.x, +which needs them. -C is now obsolete, and is only provided for -backward-compatibility. It's been replaced by the C -syntax. See L and L. +=item * -Lexical warnings pragma, C, to control optional warnings. -See L. +Some new Configure symbols, useful for extension writers: -C to control the behaviour of filetests (C<-r> C<-w> -...). Currently only one subpragma implemented, "use filetest -'access';", that uses access(2) or equivalent to check permissions -instead of using stat(2) as usual. This matters in filesystems -where there are ACLs (access control lists): the stat(2) might lie, -but access(2) knows better. +=over 8 -=head1 Utility Changes +=item d_cmsghdr -=head2 perlcc +For struct cmsghdr. -C now supports the C and Bytecode backends. By default, -it generates output from the simple C backend rather than the -optimized C backend. +=item d_fcntl_can_lock -Support for non-Unix platforms has been improved. +Whether fcntl() can be used for file locking. -=head2 perldoc +=item d_fsync -C has been reworked to avoid possible security holes. -It will not by default let itself be run as the superuser, but you -may still use the B<-U> switch to try to make it drop privileges -first. +=item d_getitimer -=head2 The Perl Debugger +=item d_getpagsz -Many bug fixes and enhancements were added to F, the -Perl debugger. The help documentation was rearranged. New commands -include C<< < ? >>, C<< > ? >>, and C<< { ? >> to list out current -actions, C> to run your doc viewer on some perl -docset, and support for quoted options. The help information was -rearranged, and should be viewable once again if you're using B -as your pager. A serious security hole was plugged--you should -immediately remove all older versions of the Perl debugger as -installed in previous releases, all the way back to perl3, from -your system to avoid being bitten by this. +For getpagesize(), though you should prefer POSIX::sysconf(_SC_PAGE_SIZE)) -=head1 Documentation Changes +=item d_msghdr_s -=over 4 +For struct msghdr. -=item perlapi.pod +=item need_va_copy -The official list of public Perl API functions. +Whether one needs to use Perl_va_copy() to copy varargs. -=item perlcompile.pod +=item d_readv -An introduction to using the Perl Compiler suite. +=item d_recvmsg -=item perldebug.pod +=item d_sendmsg -All material unrelated to running the Perl debugger, plus all -low-level guts-like details that risked crushing the casual user -of the debugger, have been relocated from the old manpage to the -next entry below. +=item sig_size -=item perldebguts.pod +The number of elements in an array needed to hold all the available signals. -This new manpage contains excessively low-level material not related -to the Perl debugger, but slightly related to debugging Perl itself. -It also contains some arcane internal details of how the debugging -process works that may only be of interest to developers of Perl -debuggers. +=item d_sockatmark -=item perlfilter.pod +=item d_strtoq -An introduction to writing Perl source filters. +=item d_u32align -=item perlhack.pod +Whether one needs to access character data aligned by U32 sized pointers. -Some guidelines for hacking the Perl source code. +=item d_ualarm -=item perlintern.pod +=item d_usleep -A list of internal functions in the Perl source code. -(List is currently empty.) +=back -=item perlopentut.pod +=item * -A tutorial on using open() effectively. +Removed Configure symbols: the PDP-11 memory model settings: huge, +large, medium, models. -=item perlreftut.pod +=item * -A tutorial that introduces the essentials of references. +SOCKS support is now much more robust. -=item perlboot.pod +=item * -A tutorial for beginners on object-oriented Perl. +If your file system supports symbolic links you can build Perl outside +of the source directory by -=item perltootc.pod + mkdir /tmp/perl/build/directory + cd /tmp/perl/build/directory + sh /path/to/perl/source/Configure -Dmksymlinks ... -A tutorial on managing class data for object modules. +This will create in /tmp/perl/build/directory a tree of symbolic links +pointing to files in /path/to/perl/source. The original files are left +unaffected. After Configure has finished you can just say -=item perlunicode.pod + make all test -An introduction to Unicode support features in Perl. +and Perl will be built and tested, all in /tmp/perl/build/directory. =back -=head1 New or Changed Diagnostics +=head2 Platform Specific Changes and Fixes =over 4 -=item "%s" variable %s masks earlier declaration in same %s - -(W misc) A "my" or "our" variable has been redeclared in the current scope or statement, -effectively eliminating all access to the previous instance. This is almost -always a typographical error. Note that the earlier variable will still exist -until the end of the scope or until all closure referents to it are -destroyed. - -=item "my sub" not yet implemented - -(F) Lexically scoped subroutines are not yet implemented. Don't try that -yet. - -=item "our" variable %s redeclared - -(W misc) You seem to have already declared the same global once before in the -current lexical scope. +=item * -=item '!' allowed only after types %s +BSDI 4.* -(F) The '!' is allowed in pack() and unpack() only after certain types. -See L. +Perl now works on post-4.0 BSD/OSes. -=item / cannot take a count +=item * -(F) You had an unpack template indicating a counted-length string, -but you have also specified an explicit size for the string. -See L. +All BSDs -=item / must be followed by a, A or Z +Setting C<$0> now works (as much as possible; see perlvar for details). -(F) You had an unpack template indicating a counted-length string, -which must be followed by one of the letters a, A or Z -to indicate what sort of string is to be unpacked. -See L. +=item * -=item / must be followed by a*, A* or Z* +Cygwin -(F) You had a pack template indicating a counted-length string, -Currently the only things that can have their length counted are a*, A* or Z*. -See L. +Numerous updates; currently synchronised with Cygwin 1.1.4. -=item / must follow a numeric type +=item * -(F) You had an unpack template that contained a '#', -but this did not follow some numeric unpack specification. -See L. +EPOC -=item /%s/: Unrecognized escape \\%c passed through +EPOC update after Perl 5.6.0. See README.epoc. -(W regexp) You used a backslash-character combination which is not recognized -by Perl. This combination appears in an interpolated variable or a -C<'>-delimited regular expression. The character was understood literally. +=item * -=item /%s/: Unrecognized escape \\%c in character class passed through +FreeBSD 3.* -(W regexp) You used a backslash-character combination which is not recognized -by Perl inside character classes. The character was understood literally. +Perl now works on post-3.0 FreeBSDs. -=item /%s/ should probably be written as "%s" +=item * -(W syntax) You have used a pattern where Perl expected to find a string, -as in the first argument to C. Perl will treat the true -or false result of matching the pattern against $_ as the string, -which is probably not what you had in mind. +HP-UX -=item %s() called too early to check prototype +README.hpux updated; C now almost works. -(W prototype) You've called a function that has a prototype before the parser saw a -definition or declaration for it, and Perl could not check that the call -conforms to the prototype. You need to either add an early prototype -declaration for the subroutine in question, or move the subroutine -definition ahead of the call to get proper prototype checking. Alternatively, -if you are certain that you're calling the function correctly, you may put -an ampersand before the name to avoid the warning. See L. +=item * -=item %s argument is not a HASH or ARRAY element +IRIX -(F) The argument to exists() must be a hash or array element, such as: +Numerous compilation flag and hint enhancements; accidental mixing +of 32-bit and 64-bit libraries (a doomed attempt) made much harder. - $foo{$bar} - $ref->[12]->["susie"] +=item * -=item %s argument is not a HASH or ARRAY element or slice +Linux -(F) The argument to delete() must be either a hash or array element, such as: +Long doubles should now work (see INSTALL). - $foo{$bar} - $ref->[12]->["susie"] +=item * -or a hash or array slice, such as: +MacOS Classic - @foo[$bar, $baz, $xyzzy] - @{$ref->[12]}{"susie", "queue"} +Compilation of the standard Perl distribution in MacOS Classic should +now work if you have the Metrowerks development environment and +the missing Mac-specific toolkit bits. Contact the macperl mailing +list for details. -=item %s argument is not a subroutine name +=item * -(F) The argument to exists() for C must be a subroutine -name, and not a subroutine call. C will generate this error. +MPE/iX -=item %s package attribute may clash with future reserved word: %s +MPE/iX update after Perl 5.6.0. See README.mpeix. -(W reserved) A lowercase attribute name was used that had a package-specific handler. -That name might have a meaning to Perl itself some day, even though it -doesn't yet. Perhaps you should use a mixed-case attribute name, instead. -See L. +=item * -=item (in cleanup) %s +NetBSD/sparc -(W misc) This prefix usually indicates that a DESTROY() method raised -the indicated exception. Since destructors are usually called by -the system at arbitrary points during execution, and often a vast -number of times, the warning is issued only once for any number -of failures that would otherwise result in the same message being -repeated. +Perl now works on NetBSD/sparc. -Failure of user callbacks dispatched using the C flag -could also result in this warning. See L. +=item * -=item <> should be quotes +OS/2 -(F) You wrote C<< require >> when you should have written -C. +Now works with usethreads (see INSTALL). -=item Attempt to join self +=item * -(F) You tried to join a thread from within itself, which is an -impossible task. You may be joining the wrong thread, or you may -need to move the join() to some other thread. +Solaris -=item Bad evalled substitution pattern +64-bitness using the Sun Workshop compiler now works. -(F) You've used the /e switch to evaluate the replacement for a -substitution, but perl found a syntax error in the code to evaluate, -most likely an unexpected right brace '}'. +=item * -=item Bad realloc() ignored +Tru64 (aka Digital UNIX, aka DEC OSF/1) -(S) An internal routine called realloc() on something that had never been -malloc()ed in the first place. Mandatory, but can be disabled by -setting environment variable C to 1. +The operating system version letter now recorded in $Config{osvers}. +Allow compiling with gcc (previously explicitly forbidden). Compiling +with gcc still not recommended because buggy code results, even with +gcc 2.95.2. -=item Bareword found in conditional +=item * -(W bareword) The compiler found a bareword where it expected a conditional, -which often indicates that an || or && was parsed as part of the -last argument of the previous construct, for example: +Unicos - open FOO || die; +Fixed various alignment problems that lead into core dumps either +during build or later; no longer dies on math errors at runtime; +now using full quad integers (64 bits), previously was using +only 46 bit integers for speed. -It may also indicate a misspelled constant that has been interpreted -as a bareword: +=item * - use constant TYPO => 1; - if (TYOP) { print "foo" } +VMS -The C pragma is useful in avoiding such errors. +chdir() now works better despite a CRT bug; now works with MULTIPLICITY +(see INSTALL); now works with Perl's malloc. -=item Binary number > 0b11111111111111111111111111111111 non-portable +=item * -(W portable) The binary number you specified is larger than 2**32-1 -(4294967295) and therefore non-portable between systems. See -L for more on portability concerns. +Windows -=item Bit vector size > 32 non-portable +=over 8 -(W portable) Using bit vector sizes larger than 32 is non-portable. +=item * -=item Buffer overflow in prime_env_iter: %s +accept() no longer leaks memory. -(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over -%ENV, it encountered a logical name or symbol definition which was too long, -so it was truncated to the string shown. +=item * -=item Can't check filesystem of script "%s" +Better chdir() return value for a non-existent directory. -(P) For some reason you can't check the filesystem of the script for nosuid. +=item * -=item Can't declare class for non-scalar %s in "%s" +New %ENV entries now propagate to subprocesses. -(S) Currently, only scalar variables can declared with a specific class -qualifier in a "my" or "our" declaration. The semantics may be extended -for other types of variables in future. +=item * -=item Can't declare %s in "%s" +$ENV{LIB} now used to search for libs under Visual C. -(F) Only scalar, array, and hash variables may be declared as "my" or -"our" variables. They must have ordinary identifiers as names. +=item * -=item Can't ignore signal CHLD, forcing to default +A failed (pseudo)fork now returns undef and sets errno to EAGAIN. -(W signal) Perl has detected that it is being run with the SIGCHLD signal -(sometimes known as SIGCLD) disabled. Since disabling this signal -will interfere with proper determination of exit status of child -processes, Perl has reset the signal to its default value. -This situation typically indicates that the parent program under -which Perl may be running (e.g., cron) is being very careless. +=item * -=item Can't modify non-lvalue subroutine call +Allow REG_EXPAND_SZ keys in the registry. -(F) Subroutines meant to be used in lvalue context should be declared as -such, see L. +=item * -=item Can't read CRTL environ +Can now send() from all threads, not just the first one. -(S) A warning peculiar to VMS. Perl tried to read an element of %ENV -from the CRTL's internal environment array and discovered the array was -missing. You need to figure out where your CRTL misplaced its environ -or define F (see L) so that environ is not searched. +=item * -=item Can't remove %s: %s, skipping file +Fake signal handling reenabled, bugs and all. -(S) You requested an inplace edit without creating a backup file. Perl -was unable to remove the original file to replace it with the modified -file. The file was left unmodified. +=item * -=item Can't return %s from lvalue subroutine +Less stack reserved per thread so that more threads can run +concurrently. (Still 16M per thread.) -(F) Perl detected an attempt to return illegal lvalues (such -as temporary or readonly values) from a subroutine used as an lvalue. -This is not allowed. +=item * -=item Can't weaken a nonreference +Ctmpdir()> now prefers C:/temp over /tmp +(works better when perl is running as service). -(F) You attempted to weaken something that was not a reference. Only -references can be weakened. +=item * -=item Character class [:%s:] unknown +Better UNC path handling under ithreads. -(F) The class in the character class [: :] syntax is unknown. -See L. +=item * -=item Character class syntax [%s] belongs inside character classes +wait() and waitpid() now work much better. -(W unsafe) The character class constructs [: :], [= =], and [. .] go -I character classes, the [] are part of the construct, -for example: /[012[:alpha:]345]/. Note that [= =] and [. .] -are not currently implemented; they are simply placeholders for -future extensions. +=item * -=item Constant is not %s reference +winsock handle leak fixed. -(F) A constant value (perhaps declared using the C pragma) -is being dereferenced, but it amounts to the wrong type of reference. The -message indicates the type of reference that was expected. This usually -indicates a syntax error in dereferencing the constant value. -See L and L. +=back -=item constant(%s): %s +=back -(F) The parser found inconsistencies either while attempting to define an -overloaded constant, or when trying to find the character name specified -in the C<\N{...}> escape. Perhaps you forgot to load the corresponding -C or C pragma? See L and L. +=head1 New or Changed Diagnostics -=item CORE::%s is not a keyword +All regular expression compilation error messages are now hopefully +easier to understand both because the error message now comes before +the failed regex and because the point of failure is now clearly +marked. -(F) The CORE:: namespace is reserved for Perl keywords. +The various "opened only for", "on closed", "never opened" warnings +drop the C prefix for filehandles in the C
package, +for example C instead of . -=item defined(@array) is deprecated +The "Unrecognized escape" warning has been extended to include C<\8>, +C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters. -(D) defined() is not usually useful on arrays because it checks for an -undefined I value. If you want to see if the array is empty, -just use C for example. +=over 4 -=item defined(%hash) is deprecated +Two new debugging options have been added: if you have compiled your +Perl with debugging, you can use the -DT and -DR options to trace +tokenising and to add reference counts to displaying variables, +respectively. -(D) defined() is not usually useful on hashes because it checks for an -undefined I value. If you want to see if the hash is empty, -just use C for example. +=item * -=item Did not produce a valid header +If an attempt to use a (non-blessed) reference as an array index +is made, a warning is given. -See Server error. +=item * -=item (Did you mean "local" instead of "our"?) +C and C (with no values to push or unshift) +now give a warning. This may be a problem for generated and evaled +code. -(W misc) Remember that "our" does not localize the declared global variable. -You have declared it again in the same lexical scope, which seems superfluous. +=back -=item Document contains no data +=head1 Changed Internals -See Server error. +=over 4 -=item entering effective %s failed +=item * -(F) While under the C pragma, switching the real and -effective uids or gids failed. +perlapi.pod (a companion to perlguts) now attempts to document the +internal API. -=item false [] range "%s" in regexp +=item * -(W regexp) A character class range must start and end at a literal character, not -another character class like C<\d> or C<[:alpha:]>. The "-" in your false -range is interpreted as a literal "-". Consider quoting the "-", "\-". -See L. +You can now build a really minimal perl called microperl. +Building microperl does not require even running Configure; +C should be enough. Beware: microperl makes +many assumptions, some of which may be too bold; the resulting +executable may crash or otherwise misbehave in wondrous ways. +For careful hackers only. -=item Filehandle %s opened only for output +=item * -(W io) You tried to read from a filehandle opened only for writing. If you -intended it to be a read/write filehandle, you needed to open it with -"+<" or "+>" or "+>>" instead of with "<" or nothing. If -you intended only to read from the file, use "<". See -L. +Added rsignal(), whichsig(), do_join() to the publicised API. -=item flock() on closed filehandle %s +=item * -(W closed) The filehandle you're attempting to flock() got itself closed some -time before now. Check your logic flow. flock() operates on filehandles. -Are you attempting to call flock() on a dirhandle by the same name? +Made possible to propagate customised exceptions via croak()ing. -=item Global symbol "%s" requires explicit package name +=item * -(F) You've said "use strict vars", which indicates that all variables -must either be lexically scoped (using "my"), declared beforehand using -"our", or explicitly qualified to say which package the global variable -is in (using "::"). +Added is_utf8_char(), is_utf8_string(), bytes_to_utf8(), and utf8_to_bytes(). -=item Hexadecimal number > 0xffffffff non-portable +=item * -(W portable) The hexadecimal number you specified is larger than 2**32-1 -(4294967295) and therefore non-portable between systems. See -L for more on portability concerns. +Now xsubs can have attributes just like subs. -=item Ill-formed CRTL environ value "%s" +=item * -(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal -environ array, and encountered an element without the C<=> delimiter -used to spearate keys from values. The element is ignored. +Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv(). +For the full list of the available APIs see L. -=item Ill-formed message in prime_env_iter: |%s| +=item * -(W internal) A warning peculiar to VMS. Perl tried to read a logical name -or CLI symbol definition when preparing to iterate over %ENV, and -didn't see the expected delimiter between key and value, so the -line was ignored. +dTHR and djSP have been obsoleted; the former removed (because it's +a no-op) and the latter replaced with dSP. -=item Illegal binary digit %s +=item * -(F) You used a digit other than 0 or 1 in a binary number. +Perl now uses system malloc instead of Perl malloc on all 64-bit +platforms, and even in some not-always-64-bit platforms like AIX, +IRIX, and Solaris. This change breaks backward compatibility but +Perl's malloc has problems with large address spaces and also the +speed of vendors' malloc is generally better in large address space +machines (Perl's malloc is mostly tuned for space). -=item Illegal binary digit %s ignored +=back -(W digit) You may have tried to use a digit other than 0 or 1 in a binary number. -Interpretation of the binary number stopped before the offending digit. +=head1 Security Vulnerability Closed -=item Illegal number of bits in vec +(This change was already made in 5.7.0 but bears repeating here.) -(F) The number of bits in vec() (the third argument) must be a power of -two from 1 to 32 (or 64, if your platform supports that). +A potential security vulnerability in the optional suidperl component +of Perl was identified in August 2000. suidperl is neither built nor +installed by default. As of November 2001 the only known vulnerable +platform is Linux, most likely all Linux distributions. CERT and +various vendors and distributors have been alerted about the vulnerability. +See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt +for more information. -=item Integer overflow in %s number +The problem was caused by Perl trying to report a suspected security +exploit attempt using an external program, /bin/mail. On Linux +platforms the /bin/mail program had an undocumented feature which +when combined with suidperl gave access to a root shell, resulting in +a serious compromise instead of reporting the exploit attempt. If you +don't have /bin/mail, or if you have 'safe setuid scripts', or if +suidperl is not installed, you are safe. + +The exploit attempt reporting feature has been completely removed from +Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also +from all the Perl 5.7 releases), so that particular vulnerability +isn't there anymore. However, further security vulnerabilities are, +unfortunately, always possible. The suidperl code is being reviewed +and if deemed too risky to continue to be supported, it may be +completely removed from future releases. In any case, suidperl should +only be used by security experts who know exactly what they are doing +and why they are using suidperl instead of some other solution such as +sudo (see http://www.courtesan.com/sudo/). + +=head1 Selected Bug Fixes + +Numerous memory leaks and uninitialized memory accesses have been hunted down. +Most importantly anonymous subs used to leak quite a bit. -(W overflow) The hexadecimal, octal or binary number you have specified either -as a literal or as an argument to hex() or oct() is too big for your -architecture, and has been converted to a floating point number. On a -32-bit architecture the largest hexadecimal, octal or binary number -representable without overflow is 0xFFFFFFFF, 037777777777, or -0b11111111111111111111111111111111 respectively. Note that Perl -transparently promotes all numbers to a floating point representation -internally--subject to loss of precision errors in subsequent -operations. +=over 4 -=item Invalid %s attribute: %s +=item * -The indicated attribute for a subroutine or variable was not recognized -by Perl or by a user-supplied handler. See L. +chop(@list) in list context returned the characters chopped in +reverse order. This has been reversed to be in the right order. -=item Invalid %s attributes: %s +=item * -The indicated attributes for a subroutine or variable were not recognized -by Perl or by a user-supplied handler. See L. +The order of DESTROYs has been made more predictable. -=item invalid [] range "%s" in regexp +=item * -The offending range is now explicitly displayed. +mkdir() now ignores trailing slashes in the directory name, +as mandated by POSIX. -=item Invalid separator character %s in attribute list +=item * -(F) Something other than a colon or whitespace was seen between the -elements of an attribute list. If the previous attribute -had a parenthesised parameter list, perhaps that list was terminated -too soon. See L. +Attributes (like :shared) didn't work with our(). -=item Invalid separator character %s in subroutine attribute list +=item * -(F) Something other than a colon or whitespace was seen between the -elements of a subroutine attribute list. If the previous attribute -had a parenthesised parameter list, perhaps that list was terminated -too soon. +The PERL5OPT environment variable (for passing command line arguments +to Perl) didn't work for more than a single group of options. -=item leaving effective %s failed +=item * -(F) While under the C pragma, switching the real and -effective uids or gids failed. +The tainting behaviour of sprintf() has been rationalized. It does +not taint the result of floating point formats anymore, making the +behaviour consistent with that of string interpolation. -=item Lvalue subs returning %s not implemented yet +=item * -(F) Due to limitations in the current implementation, array and hash -values cannot be returned in subroutines used in lvalue context. -See L. +All but the first argument of the IO syswrite() method are now optional. -=item Method %s not permitted +=item * -See Server error. +Tie::ARRAY SPLICE method was broken. -=item Missing %sbrace%s on \N{} +=item * -(F) Wrong syntax of character name literal C<\N{charname}> within -double-quotish context. +vec() now tries to work with characters <= 255 when possible, but it leaves +higher character values in place. In that case, if vec() was used to modify +the string, it is no longer considered to be utf8-encoded. -=item Missing command in piped open +=item * -(W pipe) You used the C or C -construction, but the command was missing or blank. +The autouse pragma didn't work for Multi::Part::Function::Names. -=item Missing name in "my sub" +=item * -(F) The reserved syntax for lexically scoped subroutines requires that they -have a name with which they can be found. +The behaviour of non-decimal but numeric string constants such as +"0x23" was platform-dependent: in some platforms that was seen as 35, +in some as 0, in some as a floating point number (don't ask). This +was caused by Perl using the operating system libraries in a situation +where the result of the string to number conversion is undefined: now +Perl consistently handles such strings as zero in numeric contexts. -=item No %s specified for -%c +=item * -(F) The indicated command line switch needs a mandatory argument, but -you haven't specified one. +L -R didn't work. -=item No package name allowed for variable %s in "our" +=item * -(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. +PERL5OPT with embedded spaces didn't work. -=item No space allowed after -%c +=item * -(F) The argument to the indicated command line switch must follow immediately -after the switch, without intervening spaces. +L ignored the C constant. -=item no UTC offset information; assuming local time is UTC +=back -(S) A warning peculiar to VMS. Perl was unable to find the local -timezone offset, so it's assuming that local system time is equivalent -to UTC. If it's not, define the logical name F -to translate to the number of seconds which need to be added to UTC to -get local time. +=head2 Platform Specific Changes and Fixes -=item Octal number > 037777777777 non-portable +=over 4 -(W portable) The octal number you specified is larger than 2**32-1 (4294967295) -and therefore non-portable between systems. See L for more -on portability concerns. +=item * -See also L for writing portable code. +Some versions of glibc have a broken modfl(). This affects builds +with C<-Duselongdouble>. This version of Perl detects this brokenness +and has a workaround for it. The glibc release 2.2.2 is known to have +fixed the modfl() bug. -=item panic: del_backref +=back -(P) Failed an internal consistency check while trying to reset a weak -reference. +=head2 Platform Specific Changes and Fixes -=item panic: kid popen errno read +=over 4 -(F) forked child returned an incomprehensible message about its errno. +=item * -=item panic: magic_killbackrefs +Linux previously had problems related to sockaddrlen when using +accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname(). -(P) Failed an internal consistency check while trying to reset all weak -references to an object. +=item * -=item Parentheses missing around "%s" list +Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O. -(W parenthesis) You said something like +=item * - my $foo, $bar = @_; +Windows -when you meant +=over 8 - my ($foo, $bar) = @_; +=item * -Remember that "my", "our", and "local" bind tighter than comma. +Borland C++ v5.5 is now a supported compiler that can build Perl. +However, the generated binaries continue to be incompatible with those +generated by the other supported compilers (GCC and Visual C++). -=item Possible Y2K bug: %s +=item * -(W y2k) You are concatenating the number 19 with another number, which -could be a potential Year 2000 problem. +Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root. +Other bugs in chdir() and Cwd::cwd() have also been fixed. -=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead +=item * -(W deprecated) You have written somehing like this: +Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x. - sub doit - { - use attrs qw(locked); - } +=item * -You should use the new declaration syntax instead. +HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html - sub doit : locked - { - ... +=item * -The C pragma is now obsolete, and is only provided for -backward-compatibility. See L. +The makefiles now provide a single switch to bulk-enable all the features +enabled in ActiveState ActivePerl (a popular binary distribution). +=back -=item Premature end of script headers +=head1 New Tests -See Server error. +Several new tests have been added, especially for the F subsection. -=item Repeat count in pack overflows +The tests are now reported in a different order than in earlier Perls. +(This happens because the test scripts from under t/lib have been moved +to be closer to the library/extension they are testing.) -(F) You can't specify a repeat count so large that it overflows -your signed integers. See L. +=head1 New or Changed Diagnostics -=item Repeat count in unpack overflows +=over 4 -(F) You can't specify a repeat count so large that it overflows -your signed integers. See L. +=item * -=item realloc() of freed memory ignored +In the regular expression diagnostics the CE HERE> marker +introduced in 5.7.0 has been changed to be C-- HERE> since too +many people found the CE> to be too similar to here-document +starters. -(S) An internal routine called realloc() on something that had already -been freed. +=item * -=item Reference is already weak +If you try to L a number less than 0 or larger than 255 +using the C<"C"> format you will get an optional warning. Similarly +for the C<"c"> format and a number less than -128 or more than 127. -(W misc) You have attempted to weaken a reference that is already weak. -Doing so has no effect. +=item * -=item setpgrp can't take arguments +Certain regex modifiers such as C<(?o)> make sense only if applied to +the entire regex. You will an optional warning if you try to do otherwise. -(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments, -unlike POSIX setpgid(), which takes a process ID and process group ID. +=item * -=item Strange *+?{} on zero-length expression +Using arrays or hashes as references (e.g. C<%foo->{bar}> has been +deprecated for a while. Now you will get an optional warning. -(W regexp) You applied a regular expression quantifier in a place where it -makes no sense, such as on a zero-width assertion. -Try putting the quantifier inside the assertion instead. For example, -the way to match "abc" provided that it is followed by three -repetitions of "xyz" is C, not C. +=back -=item switching effective %s is not implemented +=head1 Source Code Enhancements -(F) While under the C pragma, we cannot switch the -real and effective uids or gids. +=head2 MAGIC constants -=item This Perl can't reset CRTL environ elements (%s) +The MAGIC constants (e.g. C<'P'>) have been macrofied +(e.g. C) for better source code readability +and maintainability. -=item This Perl can't set CRTL environ elements (%s=%s) +=head2 Better commented code -(W internal) Warnings peculiar to VMS. You tried to change or delete an element -of the CRTL's internal environ array, but your copy of Perl wasn't -built with a CRTL that contained the setenv() function. You'll need to -rebuild Perl with a CRTL that does, or redefine F (see -L) so that the environ array isn't the target of the change to -%ENV which produced the warning. +F, F, and F have now been extensively commented. -=item Too late to run %s block +=head2 Regex pre-/post-compilation items matched up -(W void) A CHECK or INIT block is being defined during run time proper, -when the opportunity to run them has already passed. Perhaps you are -loading a file with C or C when you should be using -C instead. Or perhaps you should put the C or C -inside a BEGIN block. +The regex compiler now maintains a structure that identifies nodes in +the compiled bytecode with the corresponding syntactic features of the +original regex expression. The information is attached to the new +C member of the C. See L for more +complete information. -=item Unknown open() mode '%s' +=head2 gcc -Wall -(F) The second argument of 3-argument open() is not among the list -of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>, -C<< +> >>, C<<< +>> >>>, C<-|>, C<|->. +The C code has been made much more C clean. Some warning +messages still remain, though, so if you are compiling with gcc you +will see some warnings about dubious practices. The warnings are +being worked on. -=item Unknown process %x sent message to prime_env_iter: %s +=head1 Known Problems -(P) An error peculiar to VMS. Perl was reading values for %ENV before -iterating over it, and someone else stuck a message in the stream of -data Perl expected. Someone's very confused, or perhaps trying to -subvert Perl's population of %ENV for nefarious purposes. +Note that unlike other sections in this document (which describe +changes since 5.7.0) this section is cumulative containing known +problems for all the 5.7 releases. -=item Unrecognized escape \\%c passed through +=head2 AIX -(W misc) You used a backslash-character combination which is not recognized -by Perl. The character was understood literally. +=over 4 -=item Unterminated attribute parameter in attribute list +=item * -(F) The lexer saw an opening (left) parenthesis character while parsing an -attribute list, but the matching closing (right) parenthesis -character was not found. You may need to add (or remove) a backslash -character to get your parentheses to balance. See L. +In AIX 4.2 Perl extensions that use C++ functions that use statics +may have problems in that the statics are not getting initialized. +In newer AIX releases this has been solved by linking Perl with +the libC_r library, but unfortunately in AIX 4.2 the said library +has an obscure bug where the various functions related to time +(such as time() and gettimeofday()) return broken values, and +therefore in AIX 4.2 Perl is not linked against the libC_r. -=item Unterminated attribute list +=item * -(F) The lexer found something other than a simple identifier at the start -of an attribute, and it wasn't a semicolon or the start of a -block. Perhaps you terminated the parameter list of the previous attribute -too soon. See L. +vac 5.0.0.0 May Produce Buggy Code For Perl -=item Unterminated attribute parameter in subroutine attribute list +The AIX C compiler vac version 5.0.0.0 may produce buggy code, +resulting in few random tests failing, but when the failing tests +are run by hand, they succeed. We suggest upgrading to at least +vac version 5.0.1.0, that has been known to compile Perl correctly. +"lslpp -L|grep vac.C" will tell you the vac version. -(F) The lexer saw an opening (left) parenthesis character while parsing a -subroutine attribute list, but the matching closing (right) parenthesis -character was not found. You may need to add (or remove) a backslash -character to get your parentheses to balance. +=back -=item Unterminated subroutine attribute list +=head2 Amiga Perl Invoking Mystery -(F) The lexer found something other than a simple identifier at the start -of a subroutine attribute, and it wasn't a semicolon or the start of a -block. Perhaps you terminated the parameter list of the previous attribute -too soon. +One cannot call Perl using the C syntax, that is, C +works, but for example C doesn't. The exact reason is +known but the current suspect is the F library. -=item Value of CLI symbol "%s" too long +=head2 lib/ftmp-security tests warn 'system possibly insecure' -(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV -element from a CLI symbol table, and found a resultant string longer -than 1024 characters. The return value has been truncated to 1024 -characters. +Don't panic. Read INSTALL 'make test' section instead. -=item Version number must be a constant number +=head2 Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12 -(P) The attempt to translate a C statement into -its equivalent C block found an internal inconsistency with -the version number. +The subtests 11 and 12 sometimes fail and sometimes work. -=back +=head2 HP-UX lib/io_multihomed Fails When LP64-Configured -=head1 Obsolete Diagnostics +The lib/io_multihomed test may hang in HP-UX if Perl has been +configured to be 64-bit. Because other 64-bit platforms do not hang in +this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The +test attempts to create and connect to "multihomed" sockets (sockets +which have multiple IP addresses). + +=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured + +If perl is configured with -Duse64bitall, the successful result of the +subtest 10 of lib/posix may arrive before the successful result of the +subtest 9, which confuses the test harness so much that it thinks the +subtest 9 failed. + +=head2 Linux With Sfio Fails op/misc Test 48 + +No known fix. + +=head2 OS/390 + +OS/390 has rather many test failures but the situation is actually +better than it was in 5.6.0, it's just that so many new modules and +tests have been added. + + Failed Test Stat Wstat Total Fail Failed List of Failed + ----------------------------------------------------------------------------- + ../ext/B/Deparse.t 14 1 7.14% 14 + ../ext/B/Showlex.t 1 1 100.00% 1 + ../ext/Encode/Encode/Tcl.t 610 13 2.13% 592 594 596 598 + 600 602 604-610 + ../ext/IO/lib/IO/t/io_unix.t 113 28928 5 3 60.00% 3-5 + ../ext/POSIX/POSIX.t 29 1 3.45% 14 + ../ext/Storable/t/lock.t 255 65280 5 3 60.00% 3-5 + ../lib/locale.t 129 33024 117 19 16.24% 99-117 + ../lib/warnings.t 434 1 0.23% 75 + ../lib/ExtUtils.t 27 1 3.70% 25 + ../lib/Math/BigInt/t/bigintpm.t 1190 1 0.08% 1145 + ../lib/Unicode/UCD.t 81 48 59.26% 1-16 49-64 66-81 + ../lib/User/pwent.t 9 1 11.11% 4 + op/pat.t 660 6 0.91% 242-243 424-425 + 626-627 + op/split.t 0 9 ?? ?? % ?? + op/taint.t 174 3 1.72% 156 162 168 + op/tr.t 70 3 4.29% 50 58-59 + Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay. + +=head2 op/sprintf tests 129 and 130 + +The op/sprintf tests 129 and 130 are known to fail on some platforms. +Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX. +The failing platforms do not comply with the ANSI C Standard, line +19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce +something other than "1" and "-1" when formatting 0.6 and -0.6 using +the printf format "%.0f", most often they produce "0" and "-0".) + +=head2 Failure of Thread tests + +B + +The following tests are known to fail due to fundamental problems in +the 5.005 threading implementation. These are not new failures--Perl +5.005_0x has the same bugs, but didn't have these tests. + + lib/autouse.t 4 + t/lib/thr5005.t 19-20 + +=head2 UNICOS =over 4 -=item Character class syntax [: :] is reserved for future extensions - -(W) Within regular expression character classes ([]) the syntax beginning -with "[:" and ending with ":]" is reserved for future extensions. -If you need to represent those character sequences inside a regular -expression character class, just quote the square brackets with the -backslash: "\[:" and ":\]". - -=item Ill-formed logical name |%s| in prime_env_iter - -(W) A warning peculiar to VMS. A logical name was encountered when preparing -to iterate over %ENV which violates the syntactic rules governing logical -names. Because it cannot be translated normally, it is skipped, and will not -appear in %ENV. This may be a benign occurrence, as some software packages -might directly modify logical name tables and introduce nonstandard names, -or it may indicate that a logical name table has been corrupted. - -=item Probable precedence problem on %s +=item * -(W) The compiler found a bareword where it expected a conditional, -which often indicates that an || or && was parsed as part of the -last argument of the previous construct, for example: +ext/POSIX/sigaction subtests 6 and 13 may fail. - open FOO || die; +=item * -=item regexp too big +lib/ExtUtils may spuriously claim that subtest 28 failed, +which is interesting since the test only has 27 tests. -(F) The current implementation of regular expressions uses shorts as -address offsets within a string. Unfortunately this means that if -the regular expression compiles to longer than 32767, it'll blow up. -Usually when you want a regular expression this big, there is a better -way to do it with multiple statements. See L. +=item * -=item Use of "$$" to mean "${$}" is deprecated +Numerous numerical test failures -(D) Perl versions before 5.004 misinterpreted any type marker followed -by "$" and a digit. For example, "$$0" was incorrectly taken to mean -"${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004. + op/numconvert 209,210,217,218 + op/override 7 + ext/Time/HiRes/HiRes 9 + lib/Math/BigInt/t/bigintpm 1145 + lib/Math/Trig 25 -However, the developers of Perl 5.004 could not fix this bug completely, -because at least two widely-used modules depend on the old meaning of -"$$0" in a string. So Perl 5.004 still interprets "$$" in the -old (broken) way inside strings; but it generates this message as a -warning. And in Perl 5.005, this special treatment will cease. +These tests fail because of yet unresolved floating point inaccuracies. =back -=head1 Known Problems - -=head2 Thread test failures - -The subtests 19 and 20 of lib/thr5005.t test are known to fail due to -fundamental problems in the 5.005 threading implementation. These are -not new failures--Perl 5.005_0x has the same bugs, but didn't have these -tests. - -=head2 EBCDIC platforms not supported - -In earlier releases of Perl, EBCDIC environments like OS390 (also -known as Open Edition MVS) and VM-ESA were supported. Due to changes -required by the UTF-8 (Unicode) support, the EBCDIC platforms are not -supported in Perl 5.6.0. - -=head2 In 64-bit HP-UX the lib/io_multihomed test may hang - -The lib/io_multihomed test may hang in HP-UX if Perl has been -configured to be 64-bit. Because other 64-bit platforms do not -hang in this test, HP-UX is suspect. All other tests pass -in 64-bit HP-UX. The test attempts to create and connect to -"multihomed" sockets (sockets which have multiple IP addresses). - -=head2 NEXTSTEP 3.3 POSIX test failure - -In NEXTSTEP 3.3p2 the implementation of the strftime(3) in the -operating system libraries is buggy: the %j format numbers the days of -a month starting from zero, which, while being logical to programmers, -will cause the subtests 19 to 27 of the lib/posix test may fail. - -=head2 Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc - -If compiled with gcc 2.95 the lib/sdbm test will fail (dump core). -The cure is to use the vendor cc, it comes with the operating system -and produces good code. - -=head2 UNICOS/mk CC failures during Configure run - -In UNICOS/mk the following errors may appear during the Configure run: +=head2 UTS - Guessing which symbols your C compiler and preprocessor define... - CC-20 cc: ERROR File = try.c, Line = 3 - ... - bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K - ... - 4 errors detected in the compilation of "try.c". +There are a few known test failures, see L. -The culprit is the broken awk of UNICOS/mk. The effect is fortunately -rather mild: Perl itself is not adversely affected by the error, only -the h2ph utility coming with Perl, and that is rather rarely needed -these days. +=head2 VMS -=head2 Arrow operator and arrays +Rather many tests are failing in VMS but that actually more tests +succeed in VMS than they used to, it's just that there are many, +many more tests than there used to be. + +Here are the known failures from some compiler/platform combinations. + +DEC C V5.3-006 on OpenVMS VAX V6.2 + + [-.ext.list.util.t]tainted..............FAILED on test 3 + [-.ext.posix]sigaction..................FAILED on test 7 + [-.ext.time.hires]hires.................FAILED on test 14 + [-.lib.file.find]taint..................FAILED on test 17 + [-.lib.math.bigint.t]bigintpm...........FAILED on test 1183 + [-.lib.test.simple.t]exit...............FAILED on test 1 + [.lib]vmsish............................FAILED on test 13 + [.op]sprintf............................FAILED on test 12 + Failed 8/399 tests, 91.23% okay. + +DEC C V6.0-001 on OpenVMS Alpha V7.2-1 and +Compaq C V6.2-008 on OpenVMS Alpha V7.1 + + [-.ext.list.util.t]tainted..............FAILED on test 3 + [-.lib.file.find]taint..................FAILED on test 17 + [-.lib.test.simple.t]exit...............FAILED on test 1 + [.lib]vmsish............................FAILED on test 13 + Failed 4/399 tests, 92.48% okay. + +Compaq C V6.4-005 on OpenVMS Alpha 7.2.1 + + [-.ext.b]showlex........................FAILED on test 1 + [-.ext.list.util.t]tainted..............FAILED on test 3 + [-.lib.file.find]taint..................FAILED on test 17 + [-.lib.test.simple.t]exit...............FAILED on test 1 + [.lib]vmsish............................FAILED on test 13 + [.op]misc...............................FAILED on test 49 + Failed 6/401 tests, 92.77% okay. -When the left argument to the arrow operator C<< -> >> is an array, or -the C operator operating on an array, the result of the -operation must be considered erroneous. For example: +=head2 Win32 - @x->[2] - scalar(@x)->[2] +In multi-CPU boxes there are some problems with the I/O buffering: +some output may appear twice. -These expressions will get run-time errors in some future release of -Perl. +=head2 Localising a Tied Variable Leaks Memory -=head2 Experimental features + use Tie::Hash; + tie my %tie_hash => 'Tie::StdHash'; -As discussed above, many features are still experimental. Interfaces and -implementation of these features are subject to change, and in extreme cases, -even subject to removal in some future release of Perl. These features -include the following: + ... -=over 4 + local($tie_hash{Foo}) = 1; # leaks -=item Threads +Code like the above is known to leak memory every time the local() +is executed. -=item Unicode +=head2 Self-tying of Arrays and Hashes Is Forbidden -=item 64-bit support +Self-tying of arrays and hashes is broken in rather deep and +hard-to-fix ways. As a stop-gap measure to avoid people from getting +frustrated at the mysterious results (core dumps, most often) it is +for now forbidden (you will get a fatal error even from an attempt). -=item Lvalue subroutines +=head2 Variable Attributes are not Currently Usable for Tieing -=item Weak references +This limitation will hopefully be fixed in future. (Subroutine +attributes work fine for tieing, see L). -=item The pseudo-hash data type +=head2 Building Extensions Can Fail Because Of Largefiles -=item The Compiler suite +Some extensions like mod_perl are known to have issues with +`largefiles', a change brought by Perl 5.6.0 in which file offsets +default to 64 bits wide, where supported. Modules may fail to compile +at all or compile and work incorrectly. Currently there is no good +solution for the problem, but Configure now provides appropriate +non-largefile ccflags, ldflags, libswanted, and libs in the %Config +hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are +having problems can try configuring themselves without the +largefileness. This is admittedly not a clean solution, and the +solution may not even work at all. One potential failure is whether +one can (or, if one can, whether it's a good idea) link together at +all binaries with different ideas about file offsets, all this is +platform-dependent. -=item Internal implementation of file globbing +=head2 The Compiler Suite Is Still Experimental -=item The DB module +The compiler suite is slowly getting better but is nowhere near +working order yet. -=item The regular expression constructs C<(?{ code })> and C<(??{ code })> +=head2 The Long Double Support is Still Experimental -=back +The ability to configure Perl's numbers to use "long doubles", +floating point numbers of hopefully better accuracy, is still +experimental. The implementations of long doubles are not yet +widespread and the existing implementations are not quite mature +or standardised, therefore trying to support them is a rare +and moving target. The gain of more precision may also be offset +by slowdown in computations (more bits to move around, and the +operations are more likely to be executed by less optimised +libraries). -=head1 BUGS +=head1 Reporting Bugs -If you find what you think is a bug, you might check the -articles recently posted to the comp.lang.perl.misc newsgroup. -There may also be information at http://www.perl.com/perl/, the Perl -Home Page. +If you find what you think is a bug, you might check the articles +recently posted to the comp.lang.perl.misc newsgroup and the perl +bug database at http://bugs.perl.org. There may also be +information at http://www.perl.com/perl/, the Perl Home Page. If you believe you have an unreported bug, please run the B program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.com to be +output of C, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. =head1 SEE ALSO @@ -2792,9 +2344,6 @@ The F and F files for copyright information. =head1 HISTORY -Written by Gurusamy Sarathy >, with many -contributions from The Perl Porters. - -Send omissions or corrections to >. +Written by Jarkko Hietaniemi >. =cut