1PERL581DELTA(1)        Perl Programmers Reference Guide        PERL581DELTA(1)
2
3
4

NAME

6       perl581delta - what is new for perl v5.8.1
7

DESCRIPTION

9       This document describes differences between the 5.8.0 release and the
10       5.8.1 release.
11
12       If you are upgrading from an earlier release such as 5.6.1, first read
13       the perl58delta, which describes differences between 5.6.0 and 5.8.0.
14
15       In case you are wondering about 5.6.1, it was bug-fix-wise rather
16       identical to the development release 5.7.1.  Confused?  This timeline
17       hopefully helps a bit: it lists the new major releases, their
18       maintenance releases, and the development releases.
19
20                 New     Maintenance  Development
21
22                 5.6.0                             2000-Mar-22
23                                      5.7.0        2000-Sep-02
24                         5.6.1                     2001-Apr-08
25                                      5.7.1        2001-Apr-09
26                                      5.7.2        2001-Jul-13
27                                      5.7.3        2002-Mar-05
28                 5.8.0                             2002-Jul-18
29                         5.8.1                     2003-Sep-25
30

Incompatible Changes

32   Hash Randomisation
33       Mainly due to security reasons, the "random ordering" of hashes has
34       been made even more random.  Previously while the order of hash
35       elements from keys(), values(), and each() was essentially random, it
36       was still repeatable.  Now, however, the order varies between different
37       runs of Perl.
38
39       Perl has never guaranteed any ordering of the hash keys, and the
40       ordering has already changed several times during the lifetime of Perl
41       5.  Also, the ordering of hash keys has always been, and continues to
42       be, affected by the insertion order.
43
44       The added randomness may affect applications.
45
46       One possible scenario is when output of an application has included
47       hash data.  For example, if you have used the Data::Dumper module to
48       dump data into different files, and then compared the files to see
49       whether the data has changed, now you will have false positives since
50       the order in which hashes are dumped will vary.  In general the cure is
51       to sort the keys (or the values); in particular for Data::Dumper to use
52       the "Sortkeys" option.  If some particular order is really important,
53       use tied hashes: for example the Tie::IxHash module which by default
54       preserves the order in which the hash elements were added.
55
56       More subtle problem is reliance on the order of "global destruction".
57       That is what happens at the end of execution: Perl destroys all data
58       structures, including user data.  If your destructors (the DESTROY
59       subroutines) have assumed any particular ordering to the global
60       destruction, there might be problems ahead.  For example, in a
61       destructor of one object you cannot assume that objects of any other
62       class are still available, unless you hold a reference to them.  If the
63       environment variable PERL_DESTRUCT_LEVEL is set to a non-zero value, or
64       if Perl is exiting a spawned thread, it will also destruct the ordinary
65       references and the symbol tables that are no longer in use.  You can't
66       call a class method or an ordinary function on a class that has been
67       collected that way.
68
69       The hash randomisation is certain to reveal hidden assumptions about
70       some particular ordering of hash elements, and outright bugs: it
71       revealed a few bugs in the Perl core and core modules.
72
73       To disable the hash randomisation in runtime, set the environment
74       variable PERL_HASH_SEED to 0 (zero) before running Perl (for more
75       information see "PERL_HASH_SEED" in perlrun), or to disable the feature
76       completely in compile time, compile with "-DNO_HASH_SEED" (see
77       INSTALL).
78
79       See "Algorithmic Complexity Attacks" in perlsec for the original
80       rationale behind this change.
81
82   UTF-8 On Filehandles No Longer Activated By Locale
83       In Perl 5.8.0 all filehandles, including the standard filehandles, were
84       implicitly set to be in Unicode UTF-8 if the locale settings indicated
85       the use of UTF-8.  This feature caused too many problems, so the
86       feature was turned off and redesigned: see "Core Enhancements".
87
88   Single-number v-strings are no longer v-strings before "=>"
89       The version strings or v-strings (see "Version Strings" in perldata)
90       feature introduced in Perl 5.6.0 has been a source of some confusion--
91       especially when the user did not want to use it, but Perl thought it
92       knew better.  Especially troublesome has been the feature that before a
93       "=>" a version string (a "v" followed by digits) has been interpreted
94       as a v-string instead of a string literal.  In other words:
95
96               %h = ( v65 => 42 );
97
98       has meant since Perl 5.6.0
99
100               %h = ( 'A' => 42 );
101
102       (at least in platforms of ASCII progeny)  Perl 5.8.1 restores the more
103       natural interpretation
104
105               %h = ( 'v65' => 42 );
106
107       The multi-number v-strings like v65.66 and 65.66.67 still continue to
108       be v-strings in Perl 5.8.
109
110   (Win32) The -C Switch Has Been Repurposed
111       The -C switch has changed in an incompatible way.  The old semantics of
112       this switch only made sense in Win32 and only in the "use utf8"
113       universe in 5.6.x releases, and do not make sense for the Unicode
114       implementation in 5.8.0.  Since this switch could not have been used by
115       anyone, it has been repurposed.  The behavior that this switch enabled
116       in 5.6.x releases may be supported in a transparent, data-dependent
117       fashion in a future release.
118
119       For the new life of this switch, see "UTF-8 no longer default under
120       UTF-8 locales", and "-C" in perlrun.
121
122   (Win32) The /d Switch Of cmd.exe
123       Perl 5.8.1 uses the /d switch when running the cmd.exe shell internally
124       for system(), backticks, and when opening pipes to external programs.
125       The extra switch disables the execution of AutoRun commands from the
126       registry, which is generally considered undesirable when running
127       external programs.  If you wish to retain compatibility with the older
128       behavior, set PERL5SHELL in your environment to "cmd /x/c".
129

Core Enhancements

131   UTF-8 no longer default under UTF-8 locales
132       In Perl 5.8.0 many Unicode features were introduced.   One of them was
133       found to be of more nuisance than benefit: the automagic (and silent)
134       "UTF-8-ification" of filehandles, including the standard filehandles,
135       if the user's locale settings indicated use of UTF-8.
136
137       For example, if you had "en_US.UTF-8" as your locale, your STDIN and
138       STDOUT were automatically "UTF-8", in other words an implicit
139       binmode(..., ":utf8") was made.  This meant that trying to print, say,
140       chr(0xff), ended up printing the bytes 0xc3 0xbf.  Hardly what you had
141       in mind unless you were aware of this feature of Perl 5.8.0.  The
142       problem is that the vast majority of people weren't: for example in
143       RedHat releases 8 and 9 the default locale setting is UTF-8, so all
144       RedHat users got UTF-8 filehandles, whether they wanted it or not.  The
145       pain was intensified by the Unicode implementation of Perl 5.8.0
146       (still) having nasty bugs, especially related to the use of s/// and
147       tr///.  (Bugs that have been fixed in 5.8.1)
148
149       Therefore a decision was made to backtrack the feature and change it
150       from implicit silent default to explicit conscious option.  The new
151       Perl command line option "-C" and its counterpart environment variable
152       PERL_UNICODE can now be used to control how Perl and Unicode interact
153       at interfaces like I/O and for example the command line arguments.  See
154       "-C" in perlrun and "PERL_UNICODE" in perlrun for more information.
155
156   Unsafe signals again available
157       In Perl 5.8.0 the so-called "safe signals" were introduced.  This means
158       that Perl no longer handles signals immediately but instead "between
159       opcodes", when it is safe to do so.  The earlier immediate handling
160       easily could corrupt the internal state of Perl, resulting in
161       mysterious crashes.
162
163       However, the new safer model has its problems too.  Because now an
164       opcode, a basic unit of Perl execution, is never interrupted but
165       instead let to run to completion, certain operations that can take a
166       long time now really do take a long time.  For example, certain network
167       operations have their own blocking and timeout mechanisms, and being
168       able to interrupt them immediately would be nice.
169
170       Therefore perl 5.8.1 introduces a "backdoor" to restore the pre-5.8.0
171       (pre-5.7.3, really) signal behaviour.  Just set the environment
172       variable PERL_SIGNALS to "unsafe", and the old immediate (and unsafe)
173       signal handling behaviour returns.  See "PERL_SIGNALS" in perlrun and
174       "Deferred Signals (Safe Signals)" in perlipc.
175
176       In completely unrelated news, you can now use safe signals with
177       POSIX::SigAction.  See "POSIX::SigAction" in POSIX.
178
179   Tied Arrays with Negative Array Indices
180       Formerly, the indices passed to "FETCH", "STORE", "EXISTS", and
181       "DELETE" methods in tied array class were always non-negative.  If the
182       actual argument was negative, Perl would call FETCHSIZE implicitly and
183       add the result to the index before passing the result to the tied array
184       method.  This behaviour is now optional.  If the tied array class
185       contains a package variable named $NEGATIVE_INDICES which is set to a
186       true value, negative values will be passed to "FETCH", "STORE",
187       "EXISTS", and "DELETE" unchanged.
188
189   local ${$x}
190       The syntaxes
191
192               local ${$x}
193               local @{$x}
194               local %{$x}
195
196       now do localise variables, given that the $x is a valid variable name.
197
198   Unicode Character Database 4.0.0
199       The copy of the Unicode Character Database included in Perl 5.8 has
200       been updated to 4.0.0 from 3.2.0.  This means for example that the
201       Unicode character properties are as in Unicode 4.0.0.
202
203   Deprecation Warnings
204       There is one new feature deprecation.  Perl 5.8.0 forgot to add some
205       deprecation warnings, these warnings have now been added.  Finally, a
206       reminder of an impending feature removal.
207
208       (Reminder) Pseudo-hashes are deprecated (really)
209
210       Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in Perl
211       5.10.0, see perl58delta for details.  Each attempt to access pseudo-
212       hashes will trigger the warning "Pseudo-hashes are deprecated".  If you
213       really want to continue using pseudo-hashes but not to see the
214       deprecation warnings, use:
215
216           no warnings 'deprecated';
217
218       Or you can continue to use the fields pragma, but please don't expect
219       the data structures to be pseudohashes any more.
220
221       (Reminder) 5.005-style threads are deprecated (really)
222
223       5.005-style threads (activated by "use Thread;") were deprecated in
224       Perl 5.8.0 and will be removed after Perl 5.8, see perl58delta for
225       details.  Each 5.005-style thread creation will trigger the warning
226       "5.005 threads are deprecated".  If you really want to continue using
227       the 5.005 threads but not to see the deprecation warnings, use:
228
229           no warnings 'deprecated';
230
231       (Reminder) The $* variable is deprecated (really)
232
233       The $* variable controlling multi-line matching has been deprecated and
234       will be removed after 5.8.  The variable has been deprecated for a long
235       time, and a deprecation warning "Use of $* is deprecated" is given, now
236       the variable will just finally be removed.  The functionality has been
237       supplanted by the "/s" and "/m" modifiers on pattern matching.  If you
238       really want to continue using the $*-variable but not to see the
239       deprecation warnings, use:
240
241           no warnings 'deprecated';
242
243   Miscellaneous Enhancements
244       "map" in void context is no longer expensive. "map" is now context
245       aware, and will not construct a list if called in void context.
246
247       If a socket gets closed by the server while printing to it, the client
248       now gets a SIGPIPE.  While this new feature was not planned, it fell
249       naturally out of PerlIO changes, and is to be considered an accidental
250       feature.
251
252       PerlIO::get_layers(FH) returns the names of the PerlIO layers active on
253       a filehandle.
254
255       PerlIO::via layers can now have an optional UTF8 method to indicate
256       whether the layer wants to "auto-:utf8" the stream.
257
258       utf8::is_utf8() has been added as a quick way to test whether a scalar
259       is encoded internally in UTF-8 (Unicode).
260

Modules and Pragmata

262   Updated Modules And Pragmata
263       The following modules and pragmata have been updated since Perl 5.8.0:
264
265       base
266       B::Bytecode
267           In much better shape than it used to be.  Still far from perfect,
268           but maybe worth a try.
269
270       B::Concise
271       B::Deparse
272       Benchmark
273           An optional feature, ":hireswallclock", now allows for high
274           resolution wall clock times (uses Time::HiRes).
275
276       ByteLoader
277           See B::Bytecode.
278
279       bytes
280           Now has bytes::substr.
281
282       CGI
283       charnames
284           One can now have custom character name aliases.
285
286       CPAN
287           There is now a simple command line frontend to the CPAN.pm module
288           called cpan.
289
290       Data::Dumper
291           A new option, Pair, allows choosing the separator between hash keys
292           and values.
293
294       DB_File
295       Devel::PPPort
296       Digest::MD5
297       Encode
298           Significant updates on the encoding pragma functionality (tr/// and
299           the DATA filehandle, formats).
300
301           If a filehandle has been marked as to have an encoding, unmappable
302           characters are detected already during input, not later (when the
303           corrupted data is being used).
304
305           The ISO 8859-6 conversion table has been corrected (the 0x30..0x39
306           erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039).
307           The GSM 03.38 conversion did not handle escape sequences correctly.
308           The UTF-7 encoding has been added (making Encode feature-complete
309           with Unicode::String).
310
311       fields
312       libnet
313       Math::BigInt
314           A lot of bugs have been fixed since v1.60, the version included in
315           Perl v5.8.0. Especially noteworthy are the bug in Calc that caused
316           div and mod to fail for some large values, and the fixes to the
317           handling of bad inputs.
318
319           Some new features were added, e.g. the broot() method, you can now
320           pass parameters to config() to change some settings at runtime, and
321           it is now possible to trap the creation of NaN and infinity.
322
323           As usual, some optimizations took place and made the math overall a
324           tad faster. In some cases, quite a lot faster, actually. Especially
325           alternative libraries like Math::BigInt::GMP benefit from this. In
326           addition, a lot of the quite clunky routines like fsqrt() and
327           flog() are now much much faster.
328
329       MIME::Base64
330       NEXT
331           Diamond inheritance now works.
332
333       Net::Ping
334       PerlIO::scalar
335           Reading from non-string scalars (like the special variables, see
336           perlvar) now works.
337
338       podlators
339       Pod::LaTeX
340       PodParsers
341       Pod::Perldoc
342           Complete rewrite.  As a side-effect, no longer refuses to startup
343           when run by root.
344
345       Scalar::Util
346           New utilities: refaddr, isvstring, looks_like_number,
347           set_prototype.
348
349       Storable
350           Can now store code references (via B::Deparse, so not foolproof).
351
352       strict
353           Earlier versions of the strict pragma did not check the parameters
354           implicitly passed to its "import" (use) and "unimport" (no)
355           routine.  This caused the false idiom such as:
356
357                   use strict qw(@ISA);
358                   @ISA = qw(Foo);
359
360           This however (probably) raised the false expectation that the
361           strict refs, vars and subs were being enforced (and that @ISA was
362           somehow "declared").  But the strict refs, vars, and subs are not
363           enforced when using this false idiom.
364
365           Starting from Perl 5.8.1, the above will cause an error to be
366           raised.  This may cause programs which used to execute seemingly
367           correctly without warnings and errors to fail when run under 5.8.1.
368           This happens because
369
370                   use strict qw(@ISA);
371
372           will now fail with the error:
373
374                   Unknown 'strict' tag(s) '@ISA'
375
376           The remedy to this problem is to replace this code with the correct
377           idiom:
378
379                   use strict;
380                   use vars qw(@ISA);
381                   @ISA = qw(Foo);
382
383       Term::ANSIcolor
384       Test::Harness
385           Now much more picky about extra or missing output from test
386           scripts.
387
388       Test::More
389       Test::Simple
390       Text::Balanced
391       Time::HiRes
392           Use of nanosleep(), if available, allows mixing subsecond sleeps
393           with alarms.
394
395       threads
396           Several fixes, for example for join() problems and memory leaks.
397           In some platforms (like Linux) that use glibc the minimum memory
398           footprint of one ithread has been reduced by several hundred
399           kilobytes.
400
401       threads::shared
402           Many memory leaks have been fixed.
403
404       Unicode::Collate
405       Unicode::Normalize
406       Win32::GetFolderPath
407       Win32::GetOSVersion
408           Now returns extra information.
409

Utility Changes

411       The "h2xs" utility now produces a more modern layout:
412       Foo-Bar/lib/Foo/Bar.pm instead of Foo/Bar/Bar.pm.  Also, the
413       boilerplate test is now called t/Foo-Bar.t instead of t/1.t.
414
415       The Perl debugger (lib/perl5db.pl) has now been extensively documented
416       and bugs found while documenting have been fixed.
417
418       "perldoc" has been rewritten from scratch to be more robust and feature
419       rich.
420
421       "perlcc -B" works now at least somewhat better, while "perlcc -c" is
422       rather more broken.  (The Perl compiler suite as a whole continues to
423       be experimental.)
424

New Documentation

426       perl573delta has been added to list the differences between the (now
427       quite obsolete) development releases 5.7.2 and 5.7.3.
428
429       perl58delta has been added: it is the perldelta of 5.8.0, detailing the
430       differences between 5.6.0 and 5.8.0.
431
432       perlartistic has been added: it is the Artistic License in pod format,
433       making it easier for modules to refer to it.
434
435       perlcheat has been added: it is a Perl cheat sheet.
436
437       perlgpl has been added: it is the GNU General Public License in pod
438       format, making it easier for modules to refer to it.
439
440       perlmacosx has been added to tell about the installation and use of
441       Perl in Mac OS X.
442
443       perlos400 has been added to tell about the installation and use of Perl
444       in OS/400 PASE.
445
446       perlreref has been added: it is a regular expressions quick reference.
447

Installation and Configuration Improvements

449       The Unix standard Perl location, /usr/bin/perl, is no longer
450       overwritten by default if it exists.  This change was very prudent
451       because so many Unix vendors already provide a /usr/bin/perl, but
452       simultaneously many system utilities may depend on that exact version
453       of Perl, so better not to overwrite it.
454
455       One can now specify installation directories for site and vendor man
456       and HTML pages, and site and vendor scripts.  See INSTALL.
457
458       One can now specify a destination directory for Perl installation by
459       specifying the DESTDIR variable for "make install".  (This feature is
460       slightly different from the previous "Configure -Dinstallprefix=...".)
461       See INSTALL.
462
463       gcc versions 3.x introduced a new warning that caused a lot of noise
464       during Perl compilation: "gcc -Ialreadyknowndirectory (warning:
465       changing search order)".  This warning has now been avoided by
466       Configure weeding out such directories before the compilation.
467
468       One can now build subsets of Perl core modules by using the Configure
469       flags "-Dnoextensions=..." and "-Donlyextensions=...", see INSTALL.
470
471   Platform-specific enhancements
472       In Cygwin Perl can now be built with threads ("Configure
473       -Duseithreads").  This works with both Cygwin 1.3.22 and Cygwin 1.5.3.
474
475       In newer FreeBSD releases Perl 5.8.0 compilation failed because of
476       trying to use malloc.h, which in FreeBSD is just a dummy file, and a
477       fatal error to even try to use.  Now malloc.h is not used.
478
479       Perl is now known to build also in Hitachi HI-UXMPP.
480
481       Perl is now known to build again in LynxOS.
482
483       Mac OS X now installs with Perl version number embedded in installation
484       directory names for easier upgrading of user-compiled Perl, and the
485       installation directories in general are more standard.  In other words,
486       the default installation no longer breaks the Apple-provided Perl.  On
487       the other hand, with "Configure -Dprefix=/usr" you can now really
488       replace the Apple-supplied Perl (please be careful).
489
490       Mac OS X now builds Perl statically by default.  This change was done
491       mainly for faster startup times.  The Apple-provided Perl is still
492       dynamically linked and shared, and you can enable the sharedness for
493       your own Perl builds by "Configure -Duseshrplib".
494
495       Perl has been ported to IBM's OS/400 PASE environment.  The best way to
496       build a Perl for PASE is to use an AIX host as a cross-compilation
497       environment.  See README.os400.
498
499       Yet another cross-compilation option has been added: now Perl builds on
500       OpenZaurus, a Linux distribution based on Mandrake + Embedix for the
501       Sharp Zaurus PDA.  See the Cross/README file.
502
503       Tru64 when using gcc 3 drops the optimisation for toke.c to "-O2"
504       because of gigantic memory use with the default "-O3".
505
506       Tru64 can now build Perl with the newer Berkeley DBs.
507
508       Building Perl on WinCE has been much enhanced, see README.ce and
509       README.perlce.
510

Selected Bug Fixes

512   Closures, eval and lexicals
513       There have been many fixes in the area of anonymous subs, lexicals and
514       closures.  Although this means that Perl is now more "correct", it is
515       possible that some existing code will break that happens to rely on the
516       faulty behaviour.  In practice this is unlikely unless your code
517       contains a very complex nesting of anonymous subs, evals and lexicals.
518
519   Generic fixes
520       If an input filehandle is marked ":utf8" and Perl sees illegal UTF-8
521       coming in when doing "<FH>", if warnings are enabled a warning is
522       immediately given - instead of being silent about it and Perl being
523       unhappy about the broken data later.  (The ":encoding(utf8)" layer also
524       works the same way.)
525
526       binmode(SOCKET, ":utf8") only worked on the input side, not on the
527       output side of the socket.  Now it works both ways.
528
529       For threaded Perls certain system database functions like getpwent()
530       and getgrent() now grow their result buffer dynamically, instead of
531       failing.  This means that at sites with lots of users and groups the
532       functions no longer fail by returning only partial results.
533
534       Perl 5.8.0 had accidentally broken the capability for users to define
535       their own uppercase<->lowercase Unicode mappings (as advertised by the
536       Camel).  This feature has been fixed and is also documented better.
537
538       In 5.8.0 this
539
540               $some_unicode .= <FH>;
541
542       didn't work correctly but instead corrupted the data.  This has now
543       been fixed.
544
545       Tied methods like FETCH etc. may now safely access tied values, i.e.
546       resulting in a recursive call to FETCH etc.  Remember to break the
547       recursion, though.
548
549       At startup Perl blocks the SIGFPE signal away since there isn't much
550       Perl can do about it.  Previously this blocking was in effect also for
551       programs executed from within Perl.  Now Perl restores the original
552       SIGFPE handling routine, whatever it was, before running external
553       programs.
554
555       Linenumbers in Perl scripts may now be greater than 65536, or 2**16.
556       (Perl scripts have always been able to be larger than that, it's just
557       that the linenumber for reported errors and warnings have "wrapped
558       around".)  While scripts that large usually indicate a need to rethink
559       your code a bit, such Perl scripts do exist, for example as results
560       from generated code.  Now linenumbers can go all the way to 4294967296,
561       or 2**32.
562
563   Platform-specific fixes
564       Linux
565
566       ·   Setting $0 works again (with certain limitations that Perl cannot
567           do much about: see "$0" in perlvar)
568
569       HP-UX
570
571       ·   Setting $0 now works.
572
573       VMS
574
575       ·   Configuration now tests for the presence of "poll()", and IO::Poll
576           now uses the vendor-supplied function if detected.
577
578       ·   A rare access violation at Perl start-up could occur if the Perl
579           image was installed with privileges or if there was an identifier
580           with the subsystem attribute set in the process's rightslist.
581           Either of these circumstances triggered tainting code that
582           contained a pointer bug.  The faulty pointer arithmetic has been
583           fixed.
584
585       ·   The length limit on values (not keys) in the %ENV hash has been
586           raised from 255 bytes to 32640 bytes (except when the
587           PERL_ENV_TABLES setting overrides the default use of logical names
588           for %ENV).  If it is necessary to access these long values from
589           outside Perl, be aware that they are implemented using search list
590           logical names that store the value in pieces, each 255-byte piece
591           (up to 128 of them) being an element in the search list. When doing
592           a lookup in %ENV from within Perl, the elements are combined into a
593           single value.  The existing VMS-specific ability to access
594           individual elements of a search list logical name via the
595           $ENV{'foo;N'} syntax (where N is the search list index) is
596           unimpaired.
597
598       ·   The piping implementation now uses local rather than global DCL
599           symbols for inter-process communication.
600
601       ·   File::Find could become confused when navigating to a relative
602           directory whose name collided with a logical name.  This problem
603           has been corrected by adding directory syntax to relative path
604           names, thus preventing logical name translation.
605
606       Win32
607
608       ·   A memory leak in the fork() emulation has been fixed.
609
610       ·   The return value of the ioctl() built-in function was accidentally
611           broken in 5.8.0.  This has been corrected.
612
613       ·   The internal message loop executed by perl during blocking
614           operations sometimes interfered with messages that were external to
615           Perl.  This often resulted in blocking operations terminating
616           prematurely or returning incorrect results, when Perl was executing
617           under environments that could generate Windows messages.  This has
618           been corrected.
619
620       ·   Pipes and sockets are now automatically in binary mode.
621
622       ·   The four-argument form of select() did not preserve $! (errno)
623           properly when there were errors in the underlying call.  This is
624           now fixed.
625
626       ·   The "CR CR LF" problem of has been fixed, binmode(FH, ":crlf") is
627           now effectively a no-op.
628

New or Changed Diagnostics

630       All the warnings related to pack() and unpack() were made more
631       informative and consistent.
632
633   Changed "A thread exited while %d threads were running"
634       The old version
635
636           A thread exited while %d other threads were still running
637
638       was misleading because the "other" included also the thread giving the
639       warning.
640
641   Removed "Attempt to clear a restricted hash"
642       It is not illegal to clear a restricted hash, so the warning was
643       removed.
644
645   New "Illegal declaration of anonymous subroutine"
646       You must specify the block of code for "sub".
647
648   Changed "Invalid range "%s" in transliteration operator"
649       The old version
650
651           Invalid [] range "%s" in transliteration operator
652
653       was simply wrong because there are no "[] ranges" in tr///.
654
655   New "Missing control char name in \c"
656       Self-explanatory.
657
658   New "Newline in left-justified string for %s"
659       The padding spaces would appear after the newline, which is probably
660       not what you had in mind.
661
662   New "Possible precedence problem on bitwise %c operator"
663       If you think this
664
665           $x & $y == 0
666
667       tests whether the bitwise AND of $x and $y is zero, you will like this
668       warning.
669
670   New "Pseudo-hashes are deprecated"
671       This warning should have been already in 5.8.0, since they are.
672
673   New "read() on %s filehandle %s"
674       You cannot read() (or sysread()) from a closed or unopened filehandle.
675
676   New "5.005 threads are deprecated"
677       This warning should have been already in 5.8.0, since they are.
678
679   New "Tied variable freed while still in use"
680       Something pulled the plug on a live tied variable, Perl plays safe by
681       bailing out.
682
683   New "To%s: illegal mapping '%s'"
684       An illegal user-defined Unicode casemapping was specified.
685
686   New "Use of freed value in iteration"
687       Something modified the values being iterated over.  This is not good.
688

Changed Internals

690       These news matter to you only if you either write XS code or like to
691       know about or hack Perl internals (using Devel::Peek or any of the
692       "B::" modules counts), or like to run Perl with the "-D" option.
693
694       The embedding examples of perlembed have been reviewed to be up to date
695       and consistent: for example, the correct use of PERL_SYS_INIT3() and
696       PERL_SYS_TERM().
697
698       Extensive reworking of the pad code (the code responsible for lexical
699       variables) has been conducted by Dave Mitchell.
700
701       Extensive work on the v-strings by John Peacock.
702
703       UTF-8 length and position cache: to speed up the handling of Unicode
704       (UTF-8) scalars, a cache was introduced.  Potential problems exist if
705       an extension bypasses the official APIs and directly modifies the PV of
706       an SV: the UTF-8 cache does not get cleared as it should.
707
708       APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv,
709       sv_setsv, are again available.
710
711       Certain Perl core C APIs like cxinc and regatom are no longer available
712       at all to code outside the Perl core of the Perl core extensions.  This
713       is intentional.  They never should have been available with the shorter
714       names, and if you application depends on them, you should (be ashamed
715       and) contact perl5-porters to discuss what are the proper APIs.
716
717       Certain Perl core C APIs like "Perl_list" are no longer available
718       without their "Perl_" prefix.  If your XS module stops working because
719       some functions cannot be found, in many cases a simple fix is to add
720       the "Perl_" prefix to the function and the thread context "aTHX_" as
721       the first argument of the function call.  This is also how it should
722       always have been done: letting the Perl_-less forms to leak from the
723       core was an accident.  For cleaner embedding you can also force this
724       for all APIs by defining at compile time the cpp define
725       PERL_NO_SHORT_NAMES.
726
727       Perl_save_bool() has been added.
728
729       Regexp objects (those created with "qr") now have S-magic rather than
730       R-magic.  This fixed regexps of the form /...(??{...;$x})/ to no longer
731       ignore changes made to $x.  The S-magic avoids dropping the caching
732       optimization and making (??{...}) constructs obscenely slow (and
733       consequently useless).  See also "Magic Variables" in perlguts.
734       Regexp::Copy was affected by this change.
735
736       The Perl internal debugging macros DEBUG() and DEB() have been renamed
737       to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.
738
739       "-DL" removed (the leaktest had been broken and unsupported for years,
740       use alternative debugging mallocs or tools like valgrind and Purify).
741
742       Verbose modifier "v" added for "-DXv" and "-Dsv", see perlrun.
743

New Tests

745       In Perl 5.8.0 there were about 69000 separate tests in about 700 test
746       files, in Perl 5.8.1 there are about 77000 separate tests in about 780
747       test files.  The exact numbers depend on the Perl configuration and on
748       the operating system platform.
749

Known Problems

751       The hash randomisation mentioned in "Incompatible Changes" is
752       definitely problematic: it will wake dormant bugs and shake out bad
753       assumptions.
754
755       If you want to use mod_perl 2.x with Perl 5.8.1, you will need
756       mod_perl-1.99_10 or higher.  Earlier versions of mod_perl 2.x do not
757       work with the randomised hashes.  (mod_perl 1.x works fine.)  You will
758       also need Apache::Test 1.04 or higher.
759
760       Many of the rarer platforms that worked 100% or pretty close to it with
761       perl 5.8.0 have been left a little bit untended since their maintainers
762       have been otherwise busy lately, and therefore there will be more
763       failures on those platforms.  Such platforms include Mac OS Classic,
764       IBM z/OS (and other EBCDIC platforms), and NetWare.  The most common
765       Perl platforms (Unix and Unix-like, Microsoft platforms, and VMS) have
766       large enough testing and expert population that they are doing well.
767
768   Tied hashes in scalar context
769       Tied hashes do not currently return anything useful in scalar context,
770       for example when used as boolean tests:
771
772               if (%tied_hash) { ... }
773
774       The current nonsensical behaviour is always to return false, regardless
775       of whether the hash is empty or has elements.
776
777       The root cause is that there is no interface for the implementors of
778       tied hashes to implement the behaviour of a hash in scalar context.
779
780   Net::Ping 450_service and 510_ping_udp failures
781       The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the subtest
782       2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have an unusual
783       networking setup.  For example in the latter case the test is trying to
784       send a UDP ping to the IP address 127.0.0.1.
785
786   B::C
787       The C-generating compiler backend B::C (the frontend being "perlcc -c")
788       is even more broken than it used to be because of the extensive lexical
789       variable changes.  (The good news is that B::Bytecode and ByteLoader
790       are better than they used to be.)
791

Platform Specific Problems

793   EBCDIC Platforms
794       IBM z/OS and other EBCDIC platforms continue to be problematic
795       regarding Unicode support.  Many Unicode tests are skipped when they
796       really should be fixed.
797
798   Cygwin 1.5 problems
799       In Cygwin 1.5 the io/tell and op/sysio tests have failures for some yet
800       unknown reason.  In 1.5.5 the threads tests stress_cv, stress_re, and
801       stress_string are failing unless the environment variable PERLIO is set
802       to "perlio" (which makes also the io/tell failure go away).
803
804       Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a)
805       "CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ..."  a 100%
806       "make test"  was achieved with "Configure -des -Duseithreads".
807
808   HP-UX: HP cc warnings about sendfile and sendpath
809       With certain HP C compiler releases (e.g. B.11.11.02) you will get many
810       warnings like this (lines wrapped for easier reading):
811
812         cc: "/usr/include/sys/socket.h", line 504: warning 562:
813           Redeclaration of "sendfile" with a different storage class specifier:
814             "sendfile" will have internal linkage.
815         cc: "/usr/include/sys/socket.h", line 505: warning 562:
816           Redeclaration of "sendpath" with a different storage class specifier:
817             "sendpath" will have internal linkage.
818
819       The warnings show up both during the build of Perl and during certain
820       lib/ExtUtils tests that invoke the C compiler.  The warning, however,
821       is not serious and can be ignored.
822
823   IRIX: t/uni/tr_7jis.t falsely failing
824       The test t/uni/tr_7jis.t is known to report failure under 'make test'
825       or the test harness with certain releases of IRIX (at least IRIX 6.5
826       and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test
827       fully passes.
828
829   Mac OS X: no usemymalloc
830       The Perl malloc ("-Dusemymalloc") does not work at all in Mac OS X.
831       This is not that serious, though, since the native malloc works just
832       fine.
833
834   Tru64: No threaded builds with GNU cc (gcc)
835       In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used
836       to compile a threaded Perl (-Duseithreads) because the system
837       "<pthread.h>" file doesn't know about gcc.
838
839   Win32: sysopen, sysread, syswrite
840       As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave
841       like they used to in 5.6.1 and earlier with respect to "text" mode.
842       These built-ins now always operate in "binary" mode (even if sysopen()
843       was passed the O_TEXT flag, or if binmode() was used on the file
844       handle).  Note that this issue should only make a difference for disk
845       files, as sockets and pipes have always been in "binary" mode in the
846       Windows port.  As this behavior is currently considered a bug,
847       compatible behavior may be re-introduced in a future release.  Until
848       then, the use of sysopen(), sysread() and syswrite() is not supported
849       for "text" mode operations.
850

Future Directions

852       The following things might happen in future.  The first publicly
853       available releases having these characteristics will be the developer
854       releases Perl 5.9.x, culminating in the Perl 5.10.0 release.  These are
855       our best guesses at the moment: we reserve the right to rethink.
856
857       ·   PerlIO will become The Default.  Currently (in Perl 5.8.x) the
858           stdio library is still used if Perl thinks it can use certain
859           tricks to make stdio go really fast.  For future releases our goal
860           is to make PerlIO go even faster.
861
862       ·   A new feature called assertions will be available.  This means that
863           one can have code called assertions sprinkled in the code: usually
864           they are optimised away, but they can be enabled with the "-A"
865           option.
866
867       ·   A new operator "//" (defined-or) will be available.  This means
868           that one will be able to say
869
870               $a // $b
871
872           instead of
873
874              defined $a ? $a : $b
875
876           and
877
878              $c //= $d;
879
880           instead of
881
882              $c = $d unless defined $c;
883
884           The operator will have the same precedence and associativity as
885           "||".  A source code patch against the Perl 5.8.1 sources will be
886           available in CPAN as authors/id/H/HM/HMBRAND/dor-5.8.1.diff.
887
888       ·   "unpack()" will default to unpacking the $_.
889
890       ·   Various Copy-On-Write techniques will be investigated in hopes of
891           speeding up Perl.
892
893       ·   CPANPLUS, Inline, and Module::Build will become core modules.
894
895       ·   The ability to write true lexically scoped pragmas will be
896           introduced.
897
898       ·   Work will continue on the bytecompiler and byteloader.
899
900       ·   v-strings as they currently exist are scheduled to be deprecated.
901           The v-less form (1.2.3) will become a "version object" when used
902           with "use", "require", and $VERSION.  $^V will also be a "version
903           object" so the printf("%vd",...) construct will no longer be
904           needed.  The v-ful version (v1.2.3) will become obsolete.  The
905           equivalence of strings and v-strings (e.g.  that currently 5.8.0 is
906           equal to "\5\8\0") will go away.  There may be no deprecation
907           warning for v-strings, though: it is quite hard to detect when
908           v-strings are being used safely, and when they are not.
909
910       ·   5.005 Threads Will Be Removed
911
912       ·   The $* Variable Will Be Removed (it was deprecated a long time ago)
913
914       ·   Pseudohashes Will Be Removed
915

Reporting Bugs

917       If you find what you think is a bug, you might check the articles
918       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
919       database at http://bugs.perl.org/ .  There may also be information at
920       http://www.perl.com/ , the Perl Home Page.
921
922       If you believe you have an unreported bug, please run the perlbug
923       program included with your release.  Be sure to trim your bug down to a
924       tiny but sufficient test case.  Your bug report, along with the output
925       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
926       the Perl porting team.  You can browse and search the Perl 5 bugs at
927       http://bugs.perl.org/
928

SEE ALSO

930       The Changes file for exhaustive details on what changed.
931
932       The INSTALL file for how to build Perl.
933
934       The README file for general stuff.
935
936       The Artistic and Copying files for copyright information.
937
938
939
940perl v5.28.2                      2018-11-01                   PERL581DELTA(1)
Impressum