diff options
Diffstat (limited to 'upstream/archlinux/man1/perl581delta.1perl')
-rw-r--r-- | upstream/archlinux/man1/perl581delta.1perl | 1089 |
1 files changed, 1089 insertions, 0 deletions
diff --git a/upstream/archlinux/man1/perl581delta.1perl b/upstream/archlinux/man1/perl581delta.1perl new file mode 100644 index 00000000..7208296f --- /dev/null +++ b/upstream/archlinux/man1/perl581delta.1perl @@ -0,0 +1,1089 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" ======================================================================== +.\" +.IX Title "PERL581DELTA 1perl" +.TH PERL581DELTA 1perl 2024-02-11 "perl v5.38.2" "Perl Programmers Reference Guide" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +perl581delta \- what is new for perl v5.8.1 +.SH DESCRIPTION +.IX Header "DESCRIPTION" +This document describes differences between the 5.8.0 release and +the 5.8.1 release. +.PP +If you are upgrading from an earlier release such as 5.6.1, first read +the perl58delta, which describes differences between 5.6.0 and +5.8.0. +.PP +In case you are wondering about 5.6.1, it was bug-fix-wise rather +identical to the development release 5.7.1. Confused? This timeline +hopefully helps a bit: it lists the new major releases, their maintenance +releases, and the development releases. +.PP +.Vb 1 +\& New Maintenance Development +\& +\& 5.6.0 2000\-Mar\-22 +\& 5.7.0 2000\-Sep\-02 +\& 5.6.1 2001\-Apr\-08 +\& 5.7.1 2001\-Apr\-09 +\& 5.7.2 2001\-Jul\-13 +\& 5.7.3 2002\-Mar\-05 +\& 5.8.0 2002\-Jul\-18 +\& 5.8.1 2003\-Sep\-25 +.Ve +.SH "Incompatible Changes" +.IX Header "Incompatible Changes" +.SS "Hash Randomisation" +.IX Subsection "Hash Randomisation" +Mainly due to security reasons, the "random ordering" of hashes +has been made even more random. Previously while the order of hash +elements from \fBkeys()\fR, \fBvalues()\fR, and \fBeach()\fR was essentially random, +it was still repeatable. Now, however, the order varies between +different runs of Perl. +.PP +\&\fBPerl has never guaranteed any ordering of the hash keys\fR, and the +ordering has already changed several times during the lifetime of +Perl 5. Also, the ordering of hash keys has always been, and +continues to be, affected by the insertion order. +.PP +The added randomness may affect applications. +.PP +One possible scenario is when output of an application has included +hash data. For example, if you have used the Data::Dumper module to +dump data into different files, and then compared the files to see +whether the data has changed, now you will have false positives since +the order in which hashes are dumped will vary. In general the cure +is to sort the keys (or the values); in particular for Data::Dumper to +use the \f(CW\*(C`Sortkeys\*(C'\fR option. If some particular order is really +important, use tied hashes: for example the Tie::IxHash module +which by default preserves the order in which the hash elements +were added. +.PP +More subtle problem is reliance on the order of "global destruction". +That is what happens at the end of execution: Perl destroys all data +structures, including user data. If your destructors (the DESTROY +subroutines) have assumed any particular ordering to the global +destruction, there might be problems ahead. For example, in a +destructor of one object you cannot assume that objects of any other +class are still available, unless you hold a reference to them. +If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero +value, or if Perl is exiting a spawned thread, it will also destruct +the ordinary references and the symbol tables that are no longer in use. +You can't call a class method or an ordinary function on a class that +has been collected that way. +.PP +The hash randomisation is certain to reveal hidden assumptions about +some particular ordering of hash elements, and outright bugs: it +revealed a few bugs in the Perl core and core modules. +.PP +To disable the hash randomisation in runtime, set the environment +variable PERL_HASH_SEED to 0 (zero) before running Perl (for more +information see "PERL_HASH_SEED" in perlrun), or to disable the feature +completely in compile time, compile with \f(CW\*(C`\-DNO_HASH_SEED\*(C'\fR (see \fIINSTALL\fR). +.PP +See "Algorithmic Complexity Attacks" in perlsec for the original +rationale behind this change. +.SS "UTF\-8 On Filehandles No Longer Activated By Locale" +.IX Subsection "UTF-8 On Filehandles No Longer Activated By Locale" +In Perl 5.8.0 all filehandles, including the standard filehandles, +were implicitly set to be in Unicode UTF\-8 if the locale settings +indicated the use of UTF\-8. This feature caused too many problems, +so the feature was turned off and redesigned: see "Core Enhancements". +.SS "Single-number v\-strings are no longer v\-strings before ""=>""" +.IX Subsection "Single-number v-strings are no longer v-strings before ""=>""" +The version strings or v\-strings (see "Version Strings" in perldata) +feature introduced in Perl 5.6.0 has been a source of some confusion\-\- +especially when the user did not want to use it, but Perl thought it +knew better. Especially troublesome has been the feature that before +a "=>" a version string (a "v" followed by digits) has been interpreted +as a v\-string instead of a string literal. In other words: +.PP +.Vb 1 +\& %h = ( v65 => 42 ); +.Ve +.PP +has meant since Perl 5.6.0 +.PP +.Vb 1 +\& %h = ( \*(AqA\*(Aq => 42 ); +.Ve +.PP +(at least in platforms of ASCII progeny) Perl 5.8.1 restores the +more natural interpretation +.PP +.Vb 1 +\& %h = ( \*(Aqv65\*(Aq => 42 ); +.Ve +.PP +The multi-number v\-strings like v65.66 and 65.66.67 still continue to +be v\-strings in Perl 5.8. +.SS "(Win32) The \-C Switch Has Been Repurposed" +.IX Subsection "(Win32) The -C Switch Has Been Repurposed" +The \-C switch has changed in an incompatible way. The old semantics +of this switch only made sense in Win32 and only in the "use utf8" +universe in 5.6.x releases, and do not make sense for the Unicode +implementation in 5.8.0. Since this switch could not have been used +by anyone, it has been repurposed. The behavior that this switch +enabled in 5.6.x releases may be supported in a transparent, +data-dependent fashion in a future release. +.PP +For the new life of this switch, see "UTF\-8 no longer default under +UTF\-8 locales", and "\-C" in perlrun. +.SS "(Win32) The /d Switch Of cmd.exe" +.IX Subsection "(Win32) The /d Switch Of cmd.exe" +Perl 5.8.1 uses the /d switch when running the cmd.exe shell +internally for \fBsystem()\fR, backticks, and when opening pipes to external +programs. The extra switch disables the execution of AutoRun commands +from the registry, which is generally considered undesirable when +running external programs. If you wish to retain compatibility with +the older behavior, set PERL5SHELL in your environment to \f(CW\*(C`cmd /x/c\*(C'\fR. +.SH "Core Enhancements" +.IX Header "Core Enhancements" +.SS "UTF\-8 no longer default under UTF\-8 locales" +.IX Subsection "UTF-8 no longer default under UTF-8 locales" +In Perl 5.8.0 many Unicode features were introduced. One of them +was found to be of more nuisance than benefit: the automagic +(and silent) "UTF\-8\-ification" of filehandles, including the +standard filehandles, if the user's locale settings indicated +use of UTF\-8. +.PP +For example, if you had \f(CW\*(C`en_US.UTF\-8\*(C'\fR as your locale, your STDIN and +STDOUT were automatically "UTF\-8", in other words an implicit +binmode(..., ":utf8") was made. This meant that trying to print, say, +\&\fBchr\fR\|(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what +you had in mind unless you were aware of this feature of Perl 5.8.0. +The problem is that the vast majority of people weren't: for example +in RedHat releases 8 and 9 the \fBdefault\fR locale setting is UTF\-8, so +all RedHat users got UTF\-8 filehandles, whether they wanted it or not. +The pain was intensified by the Unicode implementation of Perl 5.8.0 +(still) having nasty bugs, especially related to the use of s/// and +tr///. (Bugs that have been fixed in 5.8.1) +.PP +Therefore a decision was made to backtrack the feature and change it +from implicit silent default to explicit conscious option. The new +Perl command line option \f(CW\*(C`\-C\*(C'\fR and its counterpart environment +variable PERL_UNICODE can now be used to control how Perl and Unicode +interact at interfaces like I/O and for example the command line +arguments. See "\-C" in perlrun and "PERL_UNICODE" in perlrun for more +information. +.SS "Unsafe signals again available" +.IX Subsection "Unsafe signals again available" +In Perl 5.8.0 the so-called "safe signals" were introduced. This +means that Perl no longer handles signals immediately but instead +"between opcodes", when it is safe to do so. The earlier immediate +handling easily could corrupt the internal state of Perl, resulting +in mysterious crashes. +.PP +However, the new safer model has its problems too. Because now an +opcode, a basic unit of Perl execution, is never interrupted but +instead let to run to completion, certain operations that can take a +long time now really do take a long time. For example, certain +network operations have their own blocking and timeout mechanisms, and +being able to interrupt them immediately would be nice. +.PP +Therefore perl 5.8.1 introduces a "backdoor" to restore the pre\-5.8.0 +(pre\-5.7.3, really) signal behaviour. Just set the environment variable +PERL_SIGNALS to \f(CW\*(C`unsafe\*(C'\fR, and the old immediate (and unsafe) +signal handling behaviour returns. See "PERL_SIGNALS" in perlrun +and "Deferred Signals (Safe Signals)" in perlipc. +.PP +In completely unrelated news, you can now use safe signals with +POSIX::SigAction. See "POSIX::SigAction" in POSIX. +.SS "Tied Arrays with Negative Array Indices" +.IX Subsection "Tied Arrays with Negative Array Indices" +Formerly, the indices passed to \f(CW\*(C`FETCH\*(C'\fR, \f(CW\*(C`STORE\*(C'\fR, \f(CW\*(C`EXISTS\*(C'\fR, and +\&\f(CW\*(C`DELETE\*(C'\fR methods in tied array class were always non-negative. If +the actual argument was negative, Perl would call FETCHSIZE implicitly +and add the result to the index before passing the result to the tied +array method. This behaviour is now optional. If the tied array class +contains a package variable named \f(CW$NEGATIVE_INDICES\fR which is set to +a true value, negative values will be passed to \f(CW\*(C`FETCH\*(C'\fR, \f(CW\*(C`STORE\*(C'\fR, +\&\f(CW\*(C`EXISTS\*(C'\fR, and \f(CW\*(C`DELETE\*(C'\fR unchanged. +.SS "local ${$x}" +.IX Subsection "local ${$x}" +The syntaxes +.PP +.Vb 3 +\& local ${$x} +\& local @{$x} +\& local %{$x} +.Ve +.PP +now do localise variables, given that the \f(CW$x\fR is a valid variable name. +.SS "Unicode Character Database 4.0.0" +.IX Subsection "Unicode Character Database 4.0.0" +The copy of the Unicode Character Database included in Perl 5.8 has +been updated to 4.0.0 from 3.2.0. This means for example that the +Unicode character properties are as in Unicode 4.0.0. +.SS "Deprecation Warnings" +.IX Subsection "Deprecation Warnings" +There is one new feature deprecation. Perl 5.8.0 forgot to add +some deprecation warnings, these warnings have now been added. +Finally, a reminder of an impending feature removal. +.PP +\fI(Reminder) Pseudo-hashes are deprecated (really)\fR +.IX Subsection "(Reminder) Pseudo-hashes are deprecated (really)" +.PP +Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in +Perl 5.10.0, see perl58delta for details. Each attempt to access +pseudo-hashes will trigger the warning \f(CW\*(C`Pseudo\-hashes are deprecated\*(C'\fR. +If you really want to continue using pseudo-hashes but not to see the +deprecation warnings, use: +.PP +.Vb 1 +\& no warnings \*(Aqdeprecated\*(Aq; +.Ve +.PP +Or you can continue to use the fields pragma, but please don't +expect the data structures to be pseudohashes any more. +.PP +\fI(Reminder) 5.005\-style threads are deprecated (really)\fR +.IX Subsection "(Reminder) 5.005-style threads are deprecated (really)" +.PP +5.005\-style threads (activated by \f(CW\*(C`use Thread;\*(C'\fR) were deprecated in +Perl 5.8.0 and will be removed after Perl 5.8, see perl58delta for +details. Each 5.005\-style thread creation will trigger the warning +\&\f(CW\*(C`5.005 threads are deprecated\*(C'\fR. If you really want to continue +using the 5.005 threads but not to see the deprecation warnings, use: +.PP +.Vb 1 +\& no warnings \*(Aqdeprecated\*(Aq; +.Ve +.PP +\fI(Reminder) The $* variable is deprecated (really)\fR +.IX Subsection "(Reminder) The $* variable is deprecated (really)" +.PP +The \f(CW$*\fR variable controlling multi-line matching has been deprecated +and will be removed after 5.8. The variable has been deprecated for a +long time, and a deprecation warning \f(CW\*(C`Use of $* is deprecated\*(C'\fR is given, +now the variable will just finally be removed. The functionality has +been supplanted by the \f(CW\*(C`/s\*(C'\fR and \f(CW\*(C`/m\*(C'\fR modifiers on pattern matching. +If you really want to continue using the \f(CW$*\fR\-variable but not to see +the deprecation warnings, use: +.PP +.Vb 1 +\& no warnings \*(Aqdeprecated\*(Aq; +.Ve +.SS "Miscellaneous Enhancements" +.IX Subsection "Miscellaneous Enhancements" +\&\f(CW\*(C`map\*(C'\fR in void context is no longer expensive. \f(CW\*(C`map\*(C'\fR is now context +aware, and will not construct a list if called in void context. +.PP +If a socket gets closed by the server while printing to it, the client +now gets a SIGPIPE. While this new feature was not planned, it fell +naturally out of PerlIO changes, and is to be considered an accidental +feature. +.PP +PerlIO::get_layers(FH) returns the names of the PerlIO layers +active on a filehandle. +.PP +PerlIO::via layers can now have an optional UTF8 method to +indicate whether the layer wants to "auto\-:utf8" the stream. +.PP +\&\fButf8::is_utf8()\fR has been added as a quick way to test whether +a scalar is encoded internally in UTF\-8 (Unicode). +.SH "Modules and Pragmata" +.IX Header "Modules and Pragmata" +.SS "Updated Modules And Pragmata" +.IX Subsection "Updated Modules And Pragmata" +The following modules and pragmata have been updated since Perl 5.8.0: +.IP base 4 +.IX Item "base" +.PD 0 +.IP B::Bytecode 4 +.IX Item "B::Bytecode" +.PD +In much better shape than it used to be. Still far from perfect, but +maybe worth a try. +.IP B::Concise 4 +.IX Item "B::Concise" +.PD 0 +.IP B::Deparse 4 +.IX Item "B::Deparse" +.IP Benchmark 4 +.IX Item "Benchmark" +.PD +An optional feature, \f(CW\*(C`:hireswallclock\*(C'\fR, now allows for high +resolution wall clock times (uses Time::HiRes). +.IP ByteLoader 4 +.IX Item "ByteLoader" +See B::Bytecode. +.IP bytes 4 +.IX Item "bytes" +Now has bytes::substr. +.IP CGI 4 +.IX Item "CGI" +.PD 0 +.IP charnames 4 +.IX Item "charnames" +.PD +One can now have custom character name aliases. +.IP CPAN 4 +.IX Item "CPAN" +There is now a simple command line frontend to the CPAN.pm +module called \fIcpan\fR. +.IP Data::Dumper 4 +.IX Item "Data::Dumper" +A new option, Pair, allows choosing the separator between hash keys +and values. +.IP DB_File 4 +.IX Item "DB_File" +.PD 0 +.IP Devel::PPPort 4 +.IX Item "Devel::PPPort" +.IP Digest::MD5 4 +.IX Item "Digest::MD5" +.IP Encode 4 +.IX Item "Encode" +.PD +Significant updates on the encoding pragma functionality +(tr/// and the DATA filehandle, formats). +.Sp +If a filehandle has been marked as to have an encoding, unmappable +characters are detected already during input, not later (when the +corrupted data is being used). +.Sp +The ISO 8859\-6 conversion table has been corrected (the 0x30..0x39 +erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The +GSM 03.38 conversion did not handle escape sequences correctly. The +UTF\-7 encoding has been added (making Encode feature-complete with +Unicode::String). +.IP fields 4 +.IX Item "fields" +.PD 0 +.IP libnet 4 +.IX Item "libnet" +.IP Math::BigInt 4 +.IX Item "Math::BigInt" +.PD +A lot of bugs have been fixed since v1.60, the version included in Perl +v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to +fail for some large values, and the fixes to the handling of bad inputs. +.Sp +Some new features were added, e.g. the \fBbroot()\fR method, you can now pass +parameters to \fBconfig()\fR to change some settings at runtime, and it is now +possible to trap the creation of NaN and infinity. +.Sp +As usual, some optimizations took place and made the math overall a tad +faster. In some cases, quite a lot faster, actually. Especially alternative +libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the +quite clunky routines like \fBfsqrt()\fR and \fBflog()\fR are now much much faster. +.IP MIME::Base64 4 +.IX Item "MIME::Base64" +.PD 0 +.IP NEXT 4 +.IX Item "NEXT" +.PD +Diamond inheritance now works. +.IP Net::Ping 4 +.IX Item "Net::Ping" +.PD 0 +.IP PerlIO::scalar 4 +.IX Item "PerlIO::scalar" +.PD +Reading from non-string scalars (like the special variables, see +perlvar) now works. +.IP podlators 4 +.IX Item "podlators" +.PD 0 +.IP Pod::LaTeX 4 +.IX Item "Pod::LaTeX" +.IP PodParsers 4 +.IX Item "PodParsers" +.IP Pod::Perldoc 4 +.IX Item "Pod::Perldoc" +.PD +Complete rewrite. As a side-effect, no longer refuses to startup when +run by root. +.IP Scalar::Util 4 +.IX Item "Scalar::Util" +New utilities: refaddr, isvstring, looks_like_number, set_prototype. +.IP Storable 4 +.IX Item "Storable" +Can now store code references (via B::Deparse, so not foolproof). +.IP strict 4 +.IX Item "strict" +Earlier versions of the strict pragma did not check the parameters +implicitly passed to its "import" (use) and "unimport" (no) routine. +This caused the false idiom such as: +.Sp +.Vb 2 +\& use strict qw(@ISA); +\& @ISA = qw(Foo); +.Ve +.Sp +This however (probably) raised the false expectation that the strict +refs, vars and subs were being enforced (and that \f(CW@ISA\fR was somehow +"declared"). But the strict refs, vars, and subs are \fBnot\fR enforced +when using this false idiom. +.Sp +Starting from Perl 5.8.1, the above \fBwill\fR cause an error to be +raised. This may cause programs which used to execute seemingly +correctly without warnings and errors to fail when run under 5.8.1. +This happens because +.Sp +.Vb 1 +\& use strict qw(@ISA); +.Ve +.Sp +will now fail with the error: +.Sp +.Vb 1 +\& Unknown \*(Aqstrict\*(Aq tag(s) \*(Aq@ISA\*(Aq +.Ve +.Sp +The remedy to this problem is to replace this code with the correct idiom: +.Sp +.Vb 3 +\& use strict; +\& use vars qw(@ISA); +\& @ISA = qw(Foo); +.Ve +.IP Term::ANSIcolor 4 +.IX Item "Term::ANSIcolor" +.PD 0 +.IP Test::Harness 4 +.IX Item "Test::Harness" +.PD +Now much more picky about extra or missing output from test scripts. +.IP Test::More 4 +.IX Item "Test::More" +.PD 0 +.IP Test::Simple 4 +.IX Item "Test::Simple" +.IP Text::Balanced 4 +.IX Item "Text::Balanced" +.IP Time::HiRes 4 +.IX Item "Time::HiRes" +.PD +Use of \fBnanosleep()\fR, if available, allows mixing subsecond sleeps with +alarms. +.IP threads 4 +.IX Item "threads" +Several fixes, for example for \fBjoin()\fR problems and memory +leaks. In some platforms (like Linux) that use glibc the minimum memory +footprint of one ithread has been reduced by several hundred kilobytes. +.IP threads::shared 4 +.IX Item "threads::shared" +Many memory leaks have been fixed. +.IP Unicode::Collate 4 +.IX Item "Unicode::Collate" +.PD 0 +.IP Unicode::Normalize 4 +.IX Item "Unicode::Normalize" +.IP Win32::GetFolderPath 4 +.IX Item "Win32::GetFolderPath" +.IP Win32::GetOSVersion 4 +.IX Item "Win32::GetOSVersion" +.PD +Now returns extra information. +.SH "Utility Changes" +.IX Header "Utility Changes" +The \f(CW\*(C`h2xs\*(C'\fR utility now produces a more modern layout: +\&\fIFoo\-Bar/lib/Foo/Bar.pm\fR instead of \fIFoo/Bar/Bar.pm\fR. +Also, the boilerplate test is now called \fIt/Foo\-Bar.t\fR +instead of \fIt/1.t\fR. +.PP +The Perl debugger (\fIlib/perl5db.pl\fR) has now been extensively +documented and bugs found while documenting have been fixed. +.PP +\&\f(CW\*(C`perldoc\*(C'\fR has been rewritten from scratch to be more robust and +feature rich. +.PP +\&\f(CW\*(C`perlcc \-B\*(C'\fR works now at least somewhat better, while \f(CW\*(C`perlcc \-c\*(C'\fR +is rather more broken. (The Perl compiler suite as a whole continues +to be experimental.) +.SH "New Documentation" +.IX Header "New Documentation" +perl573delta has been added to list the differences between the +(now quite obsolete) development releases 5.7.2 and 5.7.3. +.PP +perl58delta has been added: it is the perldelta of 5.8.0, detailing +the differences between 5.6.0 and 5.8.0. +.PP +perlartistic has been added: it is the Artistic License in pod format, +making it easier for modules to refer to it. +.PP +perlcheat has been added: it is a Perl cheat sheet. +.PP +perlgpl has been added: it is the GNU General Public License in pod +format, making it easier for modules to refer to it. +.PP +perlmacosx has been added to tell about the installation and use +of Perl in Mac OS X. +.PP +perlos400 has been added to tell about the installation and use +of Perl in OS/400 PASE. +.PP +perlreref has been added: it is a regular expressions quick reference. +.SH "Installation and Configuration Improvements" +.IX Header "Installation and Configuration Improvements" +The Unix standard Perl location, \fI/usr/bin/perl\fR, is no longer +overwritten by default if it exists. This change was very prudent +because so many Unix vendors already provide a \fI/usr/bin/perl\fR, +but simultaneously many system utilities may depend on that +exact version of Perl, so better not to overwrite it. +.PP +One can now specify installation directories for site and vendor man +and HTML pages, and site and vendor scripts. See \fIINSTALL\fR. +.PP +One can now specify a destination directory for Perl installation +by specifying the DESTDIR variable for \f(CW\*(C`make install\*(C'\fR. (This feature +is slightly different from the previous \f(CW\*(C`Configure \-Dinstallprefix=...\*(C'\fR.) +See \fIINSTALL\fR. +.PP +gcc versions 3.x introduced a new warning that caused a lot of noise +during Perl compilation: \f(CW\*(C`gcc \-Ialreadyknowndirectory (warning: +changing search order)\*(C'\fR. This warning has now been avoided by +Configure weeding out such directories before the compilation. +.PP +One can now build subsets of Perl core modules by using the +Configure flags \f(CW\*(C`\-Dnoextensions=...\*(C'\fR and \f(CW\*(C`\-Donlyextensions=...\*(C'\fR, +see \fIINSTALL\fR. +.SS "Platform-specific enhancements" +.IX Subsection "Platform-specific enhancements" +In Cygwin Perl can now be built with threads (\f(CW\*(C`Configure \-Duseithreads\*(C'\fR). +This works with both Cygwin 1.3.22 and Cygwin 1.5.3. +.PP +In newer FreeBSD releases Perl 5.8.0 compilation failed because of +trying to use \fImalloc.h\fR, which in FreeBSD is just a dummy file, and +a fatal error to even try to use. Now \fImalloc.h\fR is not used. +.PP +Perl is now known to build also in Hitachi HI-UXMPP. +.PP +Perl is now known to build again in LynxOS. +.PP +Mac OS X now installs with Perl version number embedded in +installation directory names for easier upgrading of user-compiled +Perl, and the installation directories in general are more standard. +In other words, the default installation no longer breaks the +Apple-provided Perl. On the other hand, with \f(CW\*(C`Configure \-Dprefix=/usr\*(C'\fR +you can now really replace the Apple-supplied Perl (\fBplease be careful\fR). +.PP +Mac OS X now builds Perl statically by default. This change was done +mainly for faster startup times. The Apple-provided Perl is still +dynamically linked and shared, and you can enable the sharedness for +your own Perl builds by \f(CW\*(C`Configure \-Duseshrplib\*(C'\fR. +.PP +Perl has been ported to IBM's OS/400 PASE environment. The best way +to build a Perl for PASE is to use an AIX host as a cross-compilation +environment. See README.os400. +.PP +Yet another cross-compilation option has been added: now Perl builds +on OpenZaurus, a Linux distribution based on Mandrake + Embedix for +the Sharp Zaurus PDA. See the Cross/README file. +.PP +Tru64 when using gcc 3 drops the optimisation for \fItoke.c\fR to \f(CW\*(C`\-O2\*(C'\fR +because of gigantic memory use with the default \f(CW\*(C`\-O3\*(C'\fR. +.PP +Tru64 can now build Perl with the newer Berkeley DBs. +.PP +Building Perl on WinCE has been much enhanced, see \fIREADME.ce\fR +and \fIREADME.perlce\fR. +.SH "Selected Bug Fixes" +.IX Header "Selected Bug Fixes" +.SS "Closures, eval and lexicals" +.IX Subsection "Closures, eval and lexicals" +There have been many fixes in the area of anonymous subs, lexicals and +closures. Although this means that Perl is now more "correct", it is +possible that some existing code will break that happens to rely on +the faulty behaviour. In practice this is unlikely unless your code +contains a very complex nesting of anonymous subs, evals and lexicals. +.SS "Generic fixes" +.IX Subsection "Generic fixes" +If an input filehandle is marked \f(CW\*(C`:utf8\*(C'\fR and Perl sees illegal UTF\-8 +coming in when doing \f(CW\*(C`<FH>\*(C'\fR, if warnings are enabled a warning is +immediately given \- instead of being silent about it and Perl being +unhappy about the broken data later. (The \f(CW:encoding(utf8)\fR layer +also works the same way.) +.PP +binmode(SOCKET, ":utf8") only worked on the input side, not on the +output side of the socket. Now it works both ways. +.PP +For threaded Perls certain system database functions like \fBgetpwent()\fR +and \fBgetgrent()\fR now grow their result buffer dynamically, instead of +failing. This means that at sites with lots of users and groups the +functions no longer fail by returning only partial results. +.PP +Perl 5.8.0 had accidentally broken the capability for users +to define their own uppercase<\->lowercase Unicode mappings +(as advertised by the Camel). This feature has been fixed and +is also documented better. +.PP +In 5.8.0 this +.PP +.Vb 1 +\& $some_unicode .= <FH>; +.Ve +.PP +didn't work correctly but instead corrupted the data. This has now +been fixed. +.PP +Tied methods like FETCH etc. may now safely access tied values, i.e. +resulting in a recursive call to FETCH etc. Remember to break the +recursion, though. +.PP +At startup Perl blocks the SIGFPE signal away since there isn't much +Perl can do about it. Previously this blocking was in effect also for +programs executed from within Perl. Now Perl restores the original +SIGFPE handling routine, whatever it was, before running external +programs. +.PP +Linenumbers in Perl scripts may now be greater than 65536, or 2**16. +(Perl scripts have always been able to be larger than that, it's just +that the linenumber for reported errors and warnings have "wrapped +around".) While scripts that large usually indicate a need to rethink +your code a bit, such Perl scripts do exist, for example as results +from generated code. Now linenumbers can go all the way to +4294967296, or 2**32. +.SS "Platform-specific fixes" +.IX Subsection "Platform-specific fixes" +Linux +.IP \(bu 4 +Setting \f(CW$0\fR works again (with certain limitations that +Perl cannot do much about: see "$0" in perlvar) +.PP +HP-UX +.IP \(bu 4 +Setting \f(CW$0\fR now works. +.PP +VMS +.IP \(bu 4 +Configuration now tests for the presence of \f(CWpoll()\fR, and IO::Poll +now uses the vendor-supplied function if detected. +.IP \(bu 4 +A rare access violation at Perl start-up could occur if the Perl image was +installed with privileges or if there was an identifier with the +subsystem attribute set in the process's rightslist. Either of these +circumstances triggered tainting code that contained a pointer bug. +The faulty pointer arithmetic has been fixed. +.IP \(bu 4 +The length limit on values (not keys) in the \f(CW%ENV\fR hash has been raised +from 255 bytes to 32640 bytes (except when the PERL_ENV_TABLES setting +overrides the default use of logical names for \f(CW%ENV\fR). If it is +necessary to access these long values from outside Perl, be aware that +they are implemented using search list logical names that store the +value in pieces, each 255\-byte piece (up to 128 of them) being an +element in the search list. When doing a lookup in \f(CW%ENV\fR from within +Perl, the elements are combined into a single value. The existing +VMS-specific ability to access individual elements of a search list +logical name via the \f(CW$ENV\fR{'foo;N'} syntax (where N is the search list +index) is unimpaired. +.IP \(bu 4 +The piping implementation now uses local rather than global DCL +symbols for inter-process communication. +.IP \(bu 4 +File::Find could become confused when navigating to a relative +directory whose name collided with a logical name. This problem has +been corrected by adding directory syntax to relative path names, thus +preventing logical name translation. +.PP +Win32 +.IP \(bu 4 +A memory leak in the \fBfork()\fR emulation has been fixed. +.IP \(bu 4 +The return value of the \fBioctl()\fR built-in function was accidentally +broken in 5.8.0. This has been corrected. +.IP \(bu 4 +The internal message loop executed by perl during blocking operations +sometimes interfered with messages that were external to Perl. +This often resulted in blocking operations terminating prematurely or +returning incorrect results, when Perl was executing under environments +that could generate Windows messages. This has been corrected. +.IP \(bu 4 +Pipes and sockets are now automatically in binary mode. +.IP \(bu 4 +The four-argument form of \fBselect()\fR did not preserve $! (errno) properly +when there were errors in the underlying call. This is now fixed. +.IP \(bu 4 +The "CR CR LF" problem of has been fixed, binmode(FH, ":crlf") +is now effectively a no-op. +.SH "New or Changed Diagnostics" +.IX Header "New or Changed Diagnostics" +All the warnings related to \fBpack()\fR and \fBunpack()\fR were made more +informative and consistent. +.ie n .SS "Changed ""A thread exited while %d threads were running""" +.el .SS "Changed ""A thread exited while \f(CW%d\fP threads were running""" +.IX Subsection "Changed ""A thread exited while %d threads were running""" +The old version +.PP +.Vb 1 +\& A thread exited while %d other threads were still running +.Ve +.PP +was misleading because the "other" included also the thread giving +the warning. +.SS "Removed ""Attempt to clear a restricted hash""" +.IX Subsection "Removed ""Attempt to clear a restricted hash""" +It is not illegal to clear a restricted hash, so the warning +was removed. +.SS "New ""Illegal declaration of anonymous subroutine""" +.IX Subsection "New ""Illegal declaration of anonymous subroutine""" +You must specify the block of code for \f(CW\*(C`sub\*(C'\fR. +.SS "Changed ""Invalid range ""%s"" in transliteration operator""" +.IX Subsection "Changed ""Invalid range ""%s"" in transliteration operator""" +The old version +.PP +.Vb 1 +\& Invalid [] range "%s" in transliteration operator +.Ve +.PP +was simply wrong because there are no "[] ranges" in tr///. +.SS "New ""Missing control char name in \ec""" +.IX Subsection "New ""Missing control char name in c""" +Self-explanatory. +.ie n .SS "New ""Newline in left-justified string for %s""" +.el .SS "New ""Newline in left-justified string for \f(CW%s\fP""" +.IX Subsection "New ""Newline in left-justified string for %s""" +The padding spaces would appear after the newline, which is +probably not what you had in mind. +.ie n .SS "New ""Possible precedence problem on bitwise %c operator""" +.el .SS "New ""Possible precedence problem on bitwise \f(CW%c\fP operator""" +.IX Subsection "New ""Possible precedence problem on bitwise %c operator""" +If you think this +.PP +.Vb 1 +\& $x & $y == 0 +.Ve +.PP +tests whether the bitwise AND of \f(CW$x\fR and \f(CW$y\fR is zero, +you will like this warning. +.SS "New ""Pseudo-hashes are deprecated""" +.IX Subsection "New ""Pseudo-hashes are deprecated""" +This warning should have been already in 5.8.0, since they are. +.ie n .SS "New ""\fBread()\fP on %s filehandle %s""" +.el .SS "New ""\fBread()\fP on \f(CW%s\fP filehandle \f(CW%s\fP""" +.IX Subsection "New ""read() on %s filehandle %s""" +You cannot \fBread()\fR (or \fBsysread()\fR) from a closed or unopened filehandle. +.SS "New ""5.005 threads are deprecated""" +.IX Subsection "New ""5.005 threads are deprecated""" +This warning should have been already in 5.8.0, since they are. +.SS "New ""Tied variable freed while still in use""" +.IX Subsection "New ""Tied variable freed while still in use""" +Something pulled the plug on a live tied variable, Perl plays +safe by bailing out. +.SS "New ""To%s: illegal mapping '%s'""" +.IX Subsection "New ""To%s: illegal mapping '%s'""" +An illegal user-defined Unicode casemapping was specified. +.SS "New ""Use of freed value in iteration""" +.IX Subsection "New ""Use of freed value in iteration""" +Something modified the values being iterated over. This is not good. +.SH "Changed Internals" +.IX Header "Changed Internals" +These news matter to you only if you either write XS code or like to +know about or hack Perl internals (using Devel::Peek or any of the +\&\f(CW\*(C`B::\*(C'\fR modules counts), or like to run Perl with the \f(CW\*(C`\-D\*(C'\fR option. +.PP +The embedding examples of perlembed have been reviewed to be +up to date and consistent: for example, the correct use of +\&\fBPERL_SYS_INIT3()\fR and \fBPERL_SYS_TERM()\fR. +.PP +Extensive reworking of the pad code (the code responsible +for lexical variables) has been conducted by Dave Mitchell. +.PP +Extensive work on the v\-strings by John Peacock. +.PP +UTF\-8 length and position cache: to speed up the handling of Unicode +(UTF\-8) scalars, a cache was introduced. Potential problems exist if +an extension bypasses the official APIs and directly modifies the PV +of an SV: the UTF\-8 cache does not get cleared as it should. +.PP +APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, +sv_setsv, are again available. +.PP +Certain Perl core C APIs like cxinc and regatom are no longer +available at all to code outside the Perl core of the Perl core +extensions. This is intentional. They never should have been +available with the shorter names, and if you application depends on +them, you should (be ashamed and) contact perl5\-porters to discuss +what are the proper APIs. +.PP +Certain Perl core C APIs like \f(CW\*(C`Perl_list\*(C'\fR are no longer available +without their \f(CW\*(C`Perl_\*(C'\fR prefix. If your XS module stops working +because some functions cannot be found, in many cases a simple fix is +to add the \f(CW\*(C`Perl_\*(C'\fR prefix to the function and the thread context +\&\f(CW\*(C`aTHX_\*(C'\fR as the first argument of the function call. This is also how +it should always have been done: letting the Perl_\-less forms to leak +from the core was an accident. For cleaner embedding you can also +force this for all APIs by defining at compile time the cpp define +PERL_NO_SHORT_NAMES. +.PP +\&\fBPerl_save_bool()\fR has been added. +.PP +Regexp objects (those created with \f(CW\*(C`qr\*(C'\fR) now have S\-magic rather than +R\-magic. This fixed regexps of the form /...(??{...;$x})/ to no +longer ignore changes made to \f(CW$x\fR. The S\-magic avoids dropping +the caching optimization and making (??{...}) constructs obscenely +slow (and consequently useless). See also "Magic Variables" in perlguts. +Regexp::Copy was affected by this change. +.PP +The Perl internal debugging macros \fBDEBUG()\fR and \fBDEB()\fR have been renamed +to \fBPERL_DEBUG()\fR and \fBPERL_DEB()\fR to avoid namespace conflicts. +.PP +\&\f(CW\*(C`\-DL\*(C'\fR removed (the leaktest had been broken and unsupported for years, +use alternative debugging mallocs or tools like valgrind and Purify). +.PP +Verbose modifier \f(CW\*(C`v\*(C'\fR added for \f(CW\*(C`\-DXv\*(C'\fR and \f(CW\*(C`\-Dsv\*(C'\fR, see perlrun. +.SH "New Tests" +.IX Header "New Tests" +In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, +in Perl 5.8.1 there are about 77000 separate tests in about 780 test files. +The exact numbers depend on the Perl configuration and on the operating +system platform. +.SH "Known Problems" +.IX Header "Known Problems" +The hash randomisation mentioned in "Incompatible Changes" is definitely +problematic: it will wake dormant bugs and shake out bad assumptions. +.PP +If you want to use mod_perl 2.x with Perl 5.8.1, you will need +mod_perl\-1.99_10 or higher. Earlier versions of mod_perl 2.x +do not work with the randomised hashes. (mod_perl 1.x works fine.) +You will also need Apache::Test 1.04 or higher. +.PP +Many of the rarer platforms that worked 100% or pretty close to it +with perl 5.8.0 have been left a little bit untended since their +maintainers have been otherwise busy lately, and therefore there will +be more failures on those platforms. Such platforms include Mac OS +Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most +common Perl platforms (Unix and Unix-like, Microsoft platforms, and +VMS) have large enough testing and expert population that they are +doing well. +.SS "Tied hashes in scalar context" +.IX Subsection "Tied hashes in scalar context" +Tied hashes do not currently return anything useful in scalar context, +for example when used as boolean tests: +.PP +.Vb 1 +\& if (%tied_hash) { ... } +.Ve +.PP +The current nonsensical behaviour is always to return false, +regardless of whether the hash is empty or has elements. +.PP +The root cause is that there is no interface for the implementors of +tied hashes to implement the behaviour of a hash in scalar context. +.SS "Net::Ping 450_service and 510_ping_udp failures" +.IX Subsection "Net::Ping 450_service and 510_ping_udp failures" +The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the +subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have +an unusual networking setup. For example in the latter case the +test is trying to send a UDP ping to the IP address 127.0.0.1. +.SS B::C +.IX Subsection "B::C" +The C\-generating compiler backend B::C (the frontend being +\&\f(CW\*(C`perlcc \-c\*(C'\fR) is even more broken than it used to be because of +the extensive lexical variable changes. (The good news is that +B::Bytecode and ByteLoader are better than they used to be.) +.SH "Platform Specific Problems" +.IX Header "Platform Specific Problems" +.SS "EBCDIC Platforms" +.IX Subsection "EBCDIC Platforms" +IBM z/OS and other EBCDIC platforms continue to be problematic +regarding Unicode support. Many Unicode tests are skipped when +they really should be fixed. +.SS "Cygwin 1.5 problems" +.IX Subsection "Cygwin 1.5 problems" +In Cygwin 1.5 the \fIio/tell\fR and \fIop/sysio\fR tests have failures for +some yet unknown reason. In 1.5.5 the threads tests stress_cv, +stress_re, and stress_string are failing unless the environment +variable PERLIO is set to "perlio" (which makes also the io/tell +failure go away). +.PP +Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname \-a) +\&\f(CW\*(C`CYGWIN_NT\-5.0 ... 1.3.22(0.78/3/2) 2003\-03\-18 09:20 i686 ...\*(C'\fR +a 100% "make test" was achieved with \f(CW\*(C`Configure \-des \-Duseithreads\*(C'\fR. +.SS "HP-UX: HP cc warnings about sendfile and sendpath" +.IX Subsection "HP-UX: HP cc warnings about sendfile and sendpath" +With certain HP C compiler releases (e.g. B.11.11.02) you will +get many warnings like this (lines wrapped for easier reading): +.PP +.Vb 6 +\& cc: "/usr/include/sys/socket.h", line 504: warning 562: +\& Redeclaration of "sendfile" with a different storage class specifier: +\& "sendfile" will have internal linkage. +\& cc: "/usr/include/sys/socket.h", line 505: warning 562: +\& Redeclaration of "sendpath" with a different storage class specifier: +\& "sendpath" will have internal linkage. +.Ve +.PP +The warnings show up both during the build of Perl and during certain +lib/ExtUtils tests that invoke the C compiler. The warning, however, +is not serious and can be ignored. +.SS "IRIX: t/uni/tr_7jis.t falsely failing" +.IX Subsection "IRIX: t/uni/tr_7jis.t falsely failing" +The test t/uni/tr_7jis.t is known to report failure under 'make test' +or the test harness with certain releases of IRIX (at least IRIX 6.5 +and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test +fully passes. +.SS "Mac OS X: no usemymalloc" +.IX Subsection "Mac OS X: no usemymalloc" +The Perl malloc (\f(CW\*(C`\-Dusemymalloc\*(C'\fR) does not work at all in Mac OS X. +This is not that serious, though, since the native malloc works just +fine. +.SS "Tru64: No threaded builds with GNU cc (gcc)" +.IX Subsection "Tru64: No threaded builds with GNU cc (gcc)" +In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used +to compile a threaded Perl (\-Duseithreads) because the system +\&\f(CW\*(C`<pthread.h>\*(C'\fR file doesn't know about gcc. +.SS "Win32: sysopen, sysread, syswrite" +.IX Subsection "Win32: sysopen, sysread, syswrite" +As of the 5.8.0 release, \fBsysopen()\fR/\fBsysread()\fR/\fBsyswrite()\fR do not behave +like they used to in 5.6.1 and earlier with respect to "text" mode. +These built-ins now always operate in "binary" mode (even if \fBsysopen()\fR +was passed the O_TEXT flag, or if \fBbinmode()\fR was used on the file +handle). Note that this issue should only make a difference for disk +files, as sockets and pipes have always been in "binary" mode in the +Windows port. As this behavior is currently considered a bug, +compatible behavior may be re-introduced in a future release. Until +then, the use of \fBsysopen()\fR, \fBsysread()\fR and \fBsyswrite()\fR is not supported +for "text" mode operations. +.SH "Future Directions" +.IX Header "Future Directions" +The following things \fBmight\fR happen in future. The first publicly +available releases having these characteristics will be the developer +releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These +are our best guesses at the moment: we reserve the right to rethink. +.IP \(bu 4 +PerlIO will become The Default. Currently (in Perl 5.8.x) the stdio +library is still used if Perl thinks it can use certain tricks to +make stdio go \fBreally\fR fast. For future releases our goal is to +make PerlIO go even faster. +.IP \(bu 4 +A new feature called \fIassertions\fR will be available. This means that +one can have code called assertions sprinkled in the code: usually +they are optimised away, but they can be enabled with the \f(CW\*(C`\-A\*(C'\fR option. +.IP \(bu 4 +A new operator \f(CW\*(C`//\*(C'\fR (defined-or) will be available. This means that +one will be able to say +.Sp +.Vb 1 +\& $a // $b +.Ve +.Sp +instead of +.Sp +.Vb 1 +\& defined $a ? $a : $b +.Ve +.Sp +and +.Sp +.Vb 1 +\& $c //= $d; +.Ve +.Sp +instead of +.Sp +.Vb 1 +\& $c = $d unless defined $c; +.Ve +.Sp +The operator will have the same precedence and associativity as \f(CW\*(C`||\*(C'\fR. +A source code patch against the Perl 5.8.1 sources will be available +in CPAN as \fIauthors/id/H/HM/HMBRAND/dor\-5.8.1.diff\fR. +.IP \(bu 4 +\&\f(CWunpack()\fR will default to unpacking the \f(CW$_\fR. +.IP \(bu 4 +Various Copy-On-Write techniques will be investigated in hopes +of speeding up Perl. +.IP \(bu 4 +CPANPLUS, Inline, and Module::Build will become core modules. +.IP \(bu 4 +The ability to write true lexically scoped pragmas will be introduced. +.IP \(bu 4 +Work will continue on the bytecompiler and byteloader. +.IP \(bu 4 +v\-strings as they currently exist are scheduled to be deprecated. The +v\-less form (1.2.3) will become a "version object" when used with \f(CW\*(C`use\*(C'\fR, +\&\f(CW\*(C`require\*(C'\fR, and \f(CW$VERSION\fR. $^V will also be a "version object" so the +printf("%vd",...) construct will no longer be needed. The v\-ful version +(v1.2.3) will become obsolete. The equivalence of strings and v\-strings (e.g. +that currently 5.8.0 is equal to "\e5\e8\e0") will go away. \fBThere may be no +deprecation warning for v\-strings\fR, though: it is quite hard to detect when +v\-strings are being used safely, and when they are not. +.IP \(bu 4 +5.005 Threads Will Be Removed +.IP \(bu 4 +The \f(CW$*\fR Variable Will Be Removed +(it was deprecated a long time ago) +.IP \(bu 4 +Pseudohashes Will Be Removed +.SH "Reporting Bugs" +.IX Header "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 and the perl +bug database at http://bugs.perl.org/ . There may also be +information at http://www.perl.com/ , the Perl Home Page. +.PP +If you believe you have an unreported bug, please run the \fBperlbug\fR +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 \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to perlbug@perl.org to be +analysed by the Perl porting team. You can browse and search +the Perl 5 bugs at http://bugs.perl.org/ +.SH "SEE ALSO" +.IX Header "SEE ALSO" +The \fIChanges\fR file for exhaustive details on what changed. +.PP +The \fIINSTALL\fR file for how to build Perl. +.PP +The \fIREADME\fR file for general stuff. +.PP +The \fIArtistic\fR and \fICopying\fR files for copyright information. |