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

NAME

6       perl571delta - what's new for perl v5.7.1
7

DESCRIPTION

9       This document describes differences between the 5.7.0 release and the
10       5.7.1 release.
11
12       (To view the differences between the 5.6.0 release and the 5.7.0
13       release, see perl570delta.)
14

Security Vulnerability Closed

16       (This change was already made in 5.7.0 but bears repeating here.)
17
18       A potential security vulnerability in the optional suidperl component
19       of Perl was identified in August 2000.  suidperl is neither built nor
20       installed by default.  As of April 2001 the only known vulnerable
21       platform is Linux, most likely all Linux distributions.  CERT and
22       various vendors and distributors have been alerted about the
23       vulnerability.  See
24       http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt for
25       more information.
26
27       The problem was caused by Perl trying to report a suspected security
28       exploit attempt using an external program, /bin/mail.  On Linux
29       platforms the /bin/mail program had an undocumented feature which when
30       combined with suidperl gave access to a root shell, resulting in a
31       serious compromise instead of reporting the exploit attempt.  If you
32       don't have /bin/mail, or if you have 'safe setuid scripts', or if
33       suidperl is not installed, you are safe.
34
35       The exploit attempt reporting feature has been completely removed from
36       all the Perl 5.7 releases (and will be gone also from the maintenance
37       release 5.6.1), so that particular vulnerability isn't there anymore.
38       However, further security vulnerabilities are, unfortunately, always
39       possible.  The suidperl code is being reviewed and if deemed too risky
40       to continue to be supported, it may be completely removed from future
41       releases.  In any case, suidperl should only be used by security
42       experts who know exactly what they are doing and why they are using
43       suidperl instead of some other solution such as sudo ( see
44       http://www.courtesan.com/sudo/ ).
45

Incompatible Changes

47       ·   Although "you shouldn't do that", it was possible to write code
48           that depends on Perl's hashed key order (Data::Dumper does this).
49           The new algorithm "One-at-a-Time" produces a different hashed key
50           order.  More details are in "Performance Enhancements".
51
52       ·   The list of filenames from glob() (or <...>) is now by default
53           sorted alphabetically to be csh-compliant.  (bsd_glob() does still
54           sort platform natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is
55           specified.)
56

Core Enhancements

58   AUTOLOAD Is Now Lvaluable
59       AUTOLOAD is now lvaluable, meaning that you can add the :lvalue
60       attribute to AUTOLOAD subroutines and you can assign to the AUTOLOAD
61       return value.
62
63   PerlIO is Now The Default
64       ·   IO is now by default done via PerlIO rather than system's "stdio".
65           PerlIO allows "layers" to be "pushed" onto a file handle to alter
66           the handle's behaviour.  Layers can be specified at open time via
67           3-arg form of open:
68
69              open($fh,'>:crlf :utf8', $path) || ...
70
71           or on already opened handles via extended "binmode":
72
73              binmode($fh,':encoding(iso-8859-7)');
74
75           The built-in layers are: unix (low level read/write), stdio (as in
76           previous Perls), perlio (re-implementation of stdio buffering in a
77           portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
78           but available on any platform).  A mmap layer may be available if
79           platform supports it (mostly Unixes).
80
81           Layers to be applied by default may be specified via the 'open'
82           pragma.
83
84           See "Installation and Configuration Improvements" for the effects
85           of PerlIO on your architecture name.
86
87       ·   File handles can be marked as accepting Perl's internal encoding of
88           Unicode (UTF-8 or UTF-EBCDIC depending on platform) by a pseudo
89           layer ":utf8" :
90
91              open($fh,">:utf8","Uni.txt");
92
93           Note for EBCDIC users: the pseudo layer ":utf8" is erroneously
94           named for you since it's not UTF-8 what you will be getting but
95           instead UTF-EBCDIC.  See perlunicode, utf8, and
96           http://www.unicode.org/unicode/reports/tr16/ for more information.
97           In future releases this naming may change.
98
99       ·   File handles can translate character encodings from/to Perl's
100           internal Unicode form on read/write via the ":encoding()" layer.
101
102       ·   File handles can be opened to "in memory" files held in Perl
103           scalars via:
104
105              open($fh,'>', \$variable) || ...
106
107       ·   Anonymous temporary files are available without need to 'use
108           FileHandle' or other module via
109
110              open($fh,"+>", undef) || ...
111
112           That is a literal undef, not an undefined value.
113
114       ·   The list form of "open" is now implemented for pipes (at least on
115           Unix):
116
117              open($fh,"-|", 'cat', '/etc/motd')
118
119           creates a pipe, and runs the equivalent of exec('cat', '/etc/motd')
120           in the child process.
121
122       ·   The following builtin functions are now overridable: chop(),
123           chomp(), each(), keys(), pop(), push(), shift(), splice(),
124           unshift().
125
126       ·   Formats now support zero-padded decimal fields.
127
128       ·   Perl now tries internally to use integer values in numeric
129           conversions and basic arithmetics (+ - * /) if the arguments are
130           integers, and tries also to keep the results stored internally as
131           integers.  This change leads into often slightly faster and always
132           less lossy arithmetics. (Previously Perl always preferred floating
133           point numbers in its math.)
134
135       ·   The printf() and sprintf() now support parameter reordering using
136           the "%\d+\$" and "*\d+\$" syntaxes.  For example
137
138               print "%2\$s %1\$s\n", "foo", "bar";
139
140           will print "bar foo\n"; This feature helps in writing
141           internationalised software.
142
143       ·   Unicode in general should be now much more usable.  Unicode can be
144           used in hash keys, Unicode in regular expressions should work now,
145           Unicode in tr/// should work now (though tr/// seems to be a
146           particularly tricky to get right, so you have been warned)
147
148       ·   The Unicode Character Database coming with Perl has been upgraded
149           to Unicode 3.1.  For more information, see http://www.unicode.org/
150           , and http://www.unicode.org/unicode/reports/tr27/
151
152           For developers interested in enhancing Perl's Unicode capabilities:
153           almost all the UCD files are included with the Perl distribution in
154           the lib/unicode subdirectory.  The most notable omission, for space
155           considerations, is the Unihan database.
156
157       ·   The Unicode character classes \p{Blank} and \p{SpacePerl} have been
158           added.  "Blank" is like C isblank(), that is, it contains only
159           "horizontal whitespace" (the space character is, the newline
160           isn't), and the "SpacePerl" is the Unicode equivalent of "\s"
161           (\p{Space} isn't, since that includes the vertical tabulator
162           character, whereas "\s" doesn't.)
163
164   Signals Are Now Safe
165       Perl used to be fragile in that signals arriving at inopportune moments
166       could corrupt Perl's internal state.
167

Modules and Pragmata

169   New Modules
170       ·   B::Concise, by Stephen McCamant, is a new compiler backend for
171           walking the Perl syntax tree, printing concise info about ops.  The
172           output is highly customisable.
173
174           See B::Concise for more information.
175
176       ·   Class::ISA, by Sean Burke, for reporting the search path for a
177           class's ISA tree, has been added.
178
179           See Class::ISA for more information.
180
181       ·   Cwd has now a split personality: if possible, an extension is used,
182           (this will hopefully be both faster and more secure and robust) but
183           if not possible, the familiar Perl library implementation is used.
184
185       ·   Digest, a frontend module for calculating digests (checksums), from
186           Gisle Aas, has been added.
187
188           See Digest for more information.
189
190       ·   Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas,
191           has been added.
192
193               use Digest::MD5 'md5_hex';
194
195               $digest = md5_hex("Thirsty Camel");
196
197               print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
198
199           NOTE: the MD5 backward compatibility module is deliberately not
200           included since its use is discouraged.
201
202           See Digest::MD5 for more information.
203
204       ·   Encode, by Nick Ing-Simmons, provides a mechanism to translate
205           between different character encodings.  Support for Unicode,
206           ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are
207           compiled in to the module.  Several other encodings (like Japanese,
208           Chinese, and MacIntosh encodings) are included and will be loaded
209           at runtime.
210
211           Any encoding supported by Encode module is also available to the
212           ":encoding()" layer if PerlIO is used.
213
214           See Encode for more information.
215
216       ·   Filter::Simple is an easy-to-use frontend to Filter::Util::Call,
217           from Damian Conway.
218
219               # in MyFilter.pm:
220
221               package MyFilter;
222
223               use Filter::Simple sub {
224                   while (my ($from, $to) = splice @_, 0, 2) {
225                           s/$from/$to/g;
226                   }
227               };
228
229               1;
230
231               # in user's code:
232
233               use MyFilter qr/red/ => 'green';
234
235               print "red\n";   # this code is filtered, will print "green\n"
236               print "bored\n"; # this code is filtered, will print "bogreen\n"
237
238               no MyFilter;
239
240               print "red\n";   # this code is not filtered, will print "red\n"
241
242           See Filter::Simple for more information.
243
244       ·   Filter::Util::Call, by Paul Marquess, provides you with the
245           framework to write Source Filters in Perl.  For most uses the
246           frontend Filter::Simple is to be preferred.  See Filter::Util::Call
247           for more information.
248
249       ·   Locale::Constants, Locale::Country, Locale::Currency, and
250           Locale::Language, from Neil Bowers, have been added.  They provide
251           the codes for various locale standards, such as "fr" for France,
252           "usd" for US Dollar, and "jp" for Japanese.
253
254               use Locale::Country;
255
256               $country = code2country('jp');               # $country gets 'Japan'
257               $code    = country2code('Norway');           # $code gets 'no'
258
259           See Locale::Constants, Locale::Country, Locale::Currency, and
260           Locale::Language for more information.
261
262       ·   MIME::Base64, by Gisle Aas, allows you to encode data in base64.
263
264               use MIME::Base64;
265
266               $encoded = encode_base64('Aladdin:open sesame');
267               $decoded = decode_base64($encoded);
268
269               print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
270
271           See MIME::Base64 for more information.
272
273       ·   MIME::QuotedPrint, by Gisle Aas, allows you to encode data in
274           quoted-printable encoding.
275
276               use MIME::QuotedPrint;
277
278               $encoded = encode_qp("Smiley in Unicode: \x{263a}");
279               $decoded = decode_qp($encoded);
280
281               print $encoded, "\n"; # "Smiley in Unicode: =263A"
282
283           MIME::QuotedPrint has been enhanced to provide the basic methods
284           necessary to use it with PerlIO::Via as in :
285
286               use MIME::QuotedPrint;
287               open($fh,">Via(MIME::QuotedPrint)",$path)
288
289           See MIME::QuotedPrint for more information.
290
291       ·   PerlIO::Scalar, by Nick Ing-Simmons, provides the implementation of
292           IO to "in memory" Perl scalars as discussed above.  It also serves
293           as an example of a loadable layer.  Other future possibilities
294           include PerlIO::Array and PerlIO::Code.  See PerlIO::Scalar for
295           more information.
296
297       ·   PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
298           PerlIO layer functionality provided by a class (typically
299           implemented in perl code).
300
301               use MIME::QuotedPrint;
302               open($fh,">Via(MIME::QuotedPrint)",$path)
303
304           This will automatically convert everything output to $fh to Quoted-
305           Printable.  See PerlIO::Via for more information.
306
307       ·   Pod::Text::Overstrike, by Joe Smith, has been added.  It converts
308           POD data to formatted overstrike text.  See Pod::Text::Overstrike
309           for more information.
310
311       ·   Switch from Damian Conway has been added.  Just by saying
312
313               use Switch;
314
315           you have "switch" and "case" available in Perl.
316
317               use Switch;
318
319               switch ($val) {
320
321                           case 1          { print "number 1" }
322                           case "a"        { print "string a" }
323                           case [1..10,42] { print "number in list" }
324                           case (@array)   { print "number in list" }
325                           case /\w+/      { print "pattern" }
326                           case qr/\w+/    { print "pattern" }
327                           case (%hash)    { print "entry in hash" }
328                           case (\%hash)   { print "entry in hash" }
329                           case (\&sub)    { print "arg to subroutine" }
330                           else            { print "previous case not true" }
331               }
332
333           See Switch for more information.
334
335       ·   Text::Balanced from Damian Conway has been added, for extracting
336           delimited text sequences from strings.
337
338               use Text::Balanced 'extract_delimited';
339
340               ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
341
342           $a will be "'never say never'", $b will be ', he never said'.
343
344           In addition to extract_delimited() there are also
345           extract_bracketed(), extract_quotelike(), extract_codeblock(),
346           extract_variable(), extract_tagged(), extract_multiple(),
347           gen_delimited_pat(), and gen_extract_tagged().  With these you can
348           implement rather advanced parsing algorithms.  See Text::Balanced
349           for more information.
350
351       ·   Tie::RefHash::Nestable, by Edward Avis, allows storing hash
352           references (unlike the standard Tie::RefHash)  The module is
353           contained within Tie::RefHash.
354
355       ·   XS::Typemap, by Tim Jenness, is a test extension that exercises XS
356           typemaps.  Nothing gets installed but for extension writers the
357           code is worth studying.
358
359   Updated And Improved Modules and Pragmata
360       ·   B::Deparse should be now more robust.  It still far from providing
361           a full round trip for any random piece of Perl code, though, and is
362           under active development: expect more robustness in 5.7.2.
363
364       ·   Class::Struct can now define the classes in compile time.
365
366       ·   Math::BigFloat has undergone much fixing, and in addition the
367           fmod() function now supports modulus operations.
368
369           ( The fixed Math::BigFloat module is also available in CPAN for
370           those who can't upgrade their Perl:
371           http://www.cpan.org/authors/id/J/JP/JPEACOCK/ )
372
373       ·   Devel::Peek now has an interface for the Perl memory statistics
374           (this works only if you are using perl's malloc, and if you have
375           compiled with debugging).
376
377       ·   IO::Socket has now atmark() method, which returns true if the
378           socket is positioned at the out-of-band mark.  The method is also
379           exportable as a sockatmark() function.
380
381       ·   IO::Socket::INET has support for ReusePort option (if your platform
382           supports it).  The Reuse option now has an alias, ReuseAddr.  For
383           clarity you may want to prefer ReuseAddr.
384
385       ·   Net::Ping has been enhanced.  There is now "external" protocol
386           which uses Net::Ping::External module which runs external ping(1)
387           and parses the output.  An alpha version of Net::Ping::External is
388           available in CPAN and in 5.7.2 the Net::Ping::External may be
389           integrated to Perl.
390
391       ·   The "open" pragma allows layers other than ":raw" and ":crlf" when
392           using PerlIO.
393
394       ·   POSIX::sigaction() is now much more flexible and robust.  You can
395           now install coderef handlers, 'DEFAULT', and 'IGNORE' handlers,
396           installing new handlers was not atomic.
397
398       ·   The Test module has been significantly enhanced.  Its use is
399           greatly recommended for module writers.
400
401       ·   The utf8:: name space (as in the pragma) provides various Perl-
402           callable functions to provide low level access to Perl's internal
403           Unicode representation.  At the moment only length() has been
404           implemented.
405
406       The following modules have been upgraded from the versions at CPAN:
407       CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text,
408       Storable, Text-Tabs+Wrap.
409

Performance Enhancements

411       ·   Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm (
412           http://burtleburtle.net/bob/hash/doobs.html ).  This algorithm is
413           reasonably fast while producing a much better spread of values than
414           the old hashing algorithm (originally by Chris Torek, later tweaked
415           by Ilya Zakharevich).  Hash values output from the algorithm on a
416           hash of all 3-char printable ASCII keys comes much closer to
417           passing the DIEHARD random number generation tests.  According to
418           perlbench, this change has not affected the overall speed of Perl.
419
420       ·   unshift() should now be noticeably faster.
421

Utility Changes

423       ·   h2xs now produces template README.
424
425       ·   s2p has been completely rewritten in Perl.  (It is in fact a full
426           implementation of sed in Perl.)
427
428       ·   xsubpp now supports OUT keyword.
429

New Documentation

431   perlclib
432       Internal replacements for standard C library functions.  (Interesting
433       only for extension writers and Perl core hackers.)
434
435   perliol
436       Internals of PerlIO with layers.
437
438   README.aix
439       Documentation on compiling Perl on AIX has been added.  AIX has several
440       different C compilers and getting the right patch level is essential.
441       On install README.aix will be installed as perlaix.
442
443   README.bs2000
444       Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC
445       mainframe environment) has been added.
446
447       This was formerly known as README.posix-bc but the name was considered
448       to be too confusing (it has nothing to do with the POSIX module or the
449       POSIX standard).  On install README.bs2000 will be installed as
450       perlbs2000.
451
452   README.macos
453       In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been
454       synchronised with the standard Perl sources.  To compile MacPerl some
455       additional steps are required, and this file documents those steps.  On
456       install README.macos will be installed as perlmacos.
457
458   README.mpeix
459       The README.mpeix has been podified, which means that this information
460       about compiling and using Perl on the MPE/iX miniframe platform will be
461       installed as perlmpeix.
462
463   README.solaris
464       README.solaris has been created and Solaris wisdom from elsewhere in
465       the Perl documentation has been collected there.  On install
466       README.solaris will be installed as perlsolaris.
467
468   README.vos
469       The README.vos has been podified, which means that this information
470       about compiling and using Perl on the Stratus VOS miniframe platform
471       will be installed as perlvos.
472
473   Porting/repository.pod
474       Documentation on how to use the Perl source repository has been added.
475

Installation and Configuration Improvements

477       ·   Because PerlIO is now the default on most platforms, "-perlio"
478           doesn't get appended to the $Config{archname} (also known as $^O)
479           anymore.  Instead, if you explicitly choose not to use perlio
480           (Configure command line option -Uuseperlio), you will get "-stdio"
481           appended.
482
483       ·   Another change related to the architecture name is that "-64all"
484           (-Duse64bitall, or "maximally 64-bit") is appended only if your
485           pointers are 64 bits wide.  (To be exact, the use64bitall is
486           ignored.)
487
488       ·   APPLLIB_EXP, a less-know configuration-time definition, has been
489           documented.  It can be used to prepend site-specific directories to
490           Perl's default search path (@INC), see INSTALL for information.
491
492       ·   Building Berkeley DB3 for compatibility modes for DB, NDBM, and
493           ODBM has been documented in INSTALL.
494
495       ·   If you are on IRIX or Tru64 platforms, new profiling/debugging
496           options have been added, see perlhack for more information about
497           pixie and Third Degree.
498
499   New Or Improved Platforms
500       For the list of platforms known to support Perl, see "Supported
501       Platforms" in perlport.
502
503       ·   AIX dynamic loading should be now better supported.
504
505       ·   After a long pause, AmigaOS has been verified to be happy with
506           Perl.
507
508       ·   EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA)
509           have been regained.  Many test suite tests still fail and the co-
510           existence of Unicode and EBCDIC isn't quite settled, but the
511           situation is much better than with Perl 5.6.  See perlos390,
512           perlbs2000 (for POSIX-BC), and perlvmesa for more information.
513
514       ·   Building perl with -Duseithreads or -Duse5005threads now works
515           under HP-UX 10.20 (previously it only worked under 10.30 or later).
516           You will need a thread library package installed. See README.hpux.
517
518       ·   Mac OS Classic (MacPerl has of course been available since perl
519           5.004 but now the source code bases of standard Perl and MacPerl
520           have been synchronised)
521
522       ·   NCR MP-RAS is now supported.
523
524       ·   NonStop-UX is now supported.
525
526       ·   Amdahl UTS is now supported.
527
528       ·   z/OS (formerly known as OS/390, formerly known as MVS OE) has now
529           support for dynamic loading.  This is not selected by default,
530           however, you must specify -Dusedl in the arguments of Configure.
531
532   Generic Improvements
533       ·   Configure no longer includes the DBM libraries (dbm, gdbm, db,
534           ndbm) when building the Perl binary.  The only exception to this is
535           SunOS 4.x, which needs them.
536
537       ·   Some new Configure symbols, useful for extension writers:
538
539           d_cmsghdr
540                   For struct cmsghdr.
541
542           d_fcntl_can_lock
543                   Whether fcntl() can be used for file locking.
544
545           d_fsync
546           d_getitimer
547           d_getpagsz
548                   For getpagesize(), though you should prefer
549                   POSIX::sysconf(_SC_PAGE_SIZE))
550
551           d_msghdr_s
552                   For struct msghdr.
553
554           need_va_copy
555                   Whether one needs to use Perl_va_copy() to copy varargs.
556
557           d_readv
558           d_recvmsg
559           d_sendmsg
560           sig_size
561                   The number of elements in an array needed to hold all the
562                   available signals.
563
564           d_sockatmark
565           d_strtoq
566           d_u32align
567                   Whether one needs to access character data aligned by U32
568                   sized pointers.
569
570           d_ualarm
571           d_usleep
572       ·   Removed Configure symbols: the PDP-11 memory model settings: huge,
573           large, medium, models.
574
575       ·   SOCKS support is now much more robust.
576
577       ·   If your file system supports symbolic links you can build Perl
578           outside of the source directory by
579
580                   mkdir perl/build/directory
581                   cd perl/build/directory
582                   sh /path/to/perl/source/Configure -Dmksymlinks ...
583
584           This will create in perl/build/directory a tree of symbolic links
585           pointing to files in /path/to/perl/source.  The original files are
586           left unaffected.  After Configure has finished you can just say
587
588                   make all test
589
590           and Perl will be built and tested, all in perl/build/directory.
591

Selected Bug Fixes

593       Numerous memory leaks and uninitialized memory accesses have been
594       hunted down.  Most importantly anonymous subs used to leak quite a bit.
595
596       ·   chop(@list) in list context returned the characters chopped in
597           reverse order.  This has been reversed to be in the right order.
598
599       ·   The order of DESTROYs has been made more predictable.
600
601       ·   mkdir() now ignores trailing slashes in the directory name, as
602           mandated by POSIX.
603
604       ·   Attributes (like :shared) didn't work with our().
605
606       ·   The PERL5OPT environment variable (for passing command line
607           arguments to Perl) didn't work for more than a single group of
608           options.
609
610       ·   The tainting behaviour of sprintf() has been rationalized.  It does
611           not taint the result of floating point formats anymore, making the
612           behaviour consistent with that of string interpolation.
613
614       ·   All but the first argument of the IO syswrite() method are now
615           optional.
616
617       ·   Tie::ARRAY SPLICE method was broken.
618
619       ·   vec() now tries to work with characters <= 255 when possible, but
620           it leaves higher character values in place.  In that case, if vec()
621           was used to modify the string, it is no longer considered to be
622           utf8-encoded.
623
624   Platform Specific Changes and Fixes
625       ·   Linux previously had problems related to sockaddrlen when using
626           accept(), revcfrom() (in Perl: recv()), getpeername(), and
627           getsockname().
628
629       ·   Previously DYNIX/ptx had problems in its Configure probe for non-
630           blocking I/O.
631
632       ·   Windows
633
634           ·       Borland C++ v5.5 is now a supported compiler that can build
635                   Perl.  However, the generated binaries continue to be
636                   incompatible with those generated by the other supported
637                   compilers (GCC and Visual C++).
638
639           ·       Win32::GetCwd() correctly returns C:\ instead of C: when at
640                   the drive root.  Other bugs in chdir() and Cwd::cwd() have
641                   also been fixed.
642
643           ·       Duping socket handles with open(F, ">&MYSOCK") now works
644                   under Windows 9x.
645
646           ·       HTML files will be installed in c:\perl\html instead of
647                   c:\perl\lib\pod\html
648
649           ·       The makefiles now provide a single switch to bulk-enable
650                   all the features enabled in ActiveState ActivePerl (a
651                   popular binary distribution).
652

New or Changed Diagnostics

654       Two new debugging options have been added: if you have compiled your
655       Perl with debugging, you can use the -DT and -DR options to trace
656       tokenising and to add reference counts to displaying variables,
657       respectively.
658
659       ·   If an attempt to use a (non-blessed) reference as an array index is
660           made, a warning is given.
661
662       ·   "push @a;" and "unshift @a;" (with no values to push or unshift)
663           now give a warning.  This may be a problem for generated and
664           eval'ed code.
665

Changed Internals

667       ·   Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv().
668           For the full list of the available APIs see perlapi.
669
670       ·   dTHR and djSP have been obsoleted; the former removed (because it's
671           a no-op) and the latter replaced with dSP.
672
673       ·   Perl now uses system malloc instead of Perl malloc on all 64-bit
674           platforms, and even in some not-always-64-bit platforms like AIX,
675           IRIX, and Solaris.  This change breaks backward compatibility but
676           Perl's malloc has problems with large address spaces and also the
677           speed of vendors' malloc is generally better in large address space
678           machines (Perl's malloc is mostly tuned for space).
679

New Tests

681       Many new tests have been added.  The most notable is probably the
682       lib/1_compile: it is very notable because running it takes quite a long
683       time. It test compiles all the Perl modules in the distribution.
684       Please be patient.
685

Known Problems

687       Note that unlike other sections in this document (which describe
688       changes since 5.7.0) this section is cumulative containing known
689       problems for all the 5.7 releases.
690
691   AIX vac 5.0.0.0 May Produce Buggy Code For Perl
692       The AIX C compiler vac version 5.0.0.0 may produce buggy code,
693       resulting in few random tests failing, but when the failing tests are
694       run by hand, they succeed.  We suggest upgrading to at least vac
695       version 5.0.1.0, that has been known to compile Perl correctly.  "lslpp
696       -L|grep vac.C" will tell you the vac version.
697
698   lib/ftmp-security tests warn 'system possibly insecure'
699       Don't panic.  Read INSTALL 'make test' section instead.
700
701   lib/io_multihomed Fails In LP64-Configured HP-UX
702       The lib/io_multihomed test may hang in HP-UX if Perl has been
703       configured to be 64-bit. Because other 64-bit platforms do not hang in
704       this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
705       test attempts to create and connect to "multihomed" sockets (sockets
706       which have multiple IP addresses).
707
708   Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
709       If perl is configured with -Duse64bitall, the successful result of the
710       subtest 10 of lib/posix may arrive before the successful result of the
711       subtest 9, which confuses the test harness so much that it thinks the
712       subtest 9 failed.
713
714   lib/b test 19
715       The test fails on various platforms (PA64 and IA64 are known), but the
716       exact cause is still being investigated.
717
718   Linux With Sfio Fails op/misc Test 48
719       No known fix.
720
721   sigaction test 13 in VMS
722       The test is known to fail; whether it's because of VMS of because of
723       faulty test is not known.
724
725   sprintf tests 129 and 130
726       The op/sprintf tests 129 and 130 are known to fail on some platforms.
727       Examples include any platform using sfio, and Compaq/Tandem's NonStop-
728       UX.  The failing platforms do not comply with the ANSI C Standard, line
729       19ff on page 134 of ANSI X3.159 1989 to be exact.  (They produce
730       something else than "1" and "-1" when formatting 0.6 and -0.6 using the
731       printf format "%.0f", most often they produce "0" and "-0".)
732
733   Failure of Thread tests
734       The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
735       fundamental problems in the 5.005 threading implementation. These are
736       not new failures--Perl 5.005_0x has the same bugs, but didn't have
737       these tests. (Note that support for 5.005-style threading remains
738       experimental.)
739
740   Localising a Tied Variable Leaks Memory
741           use Tie::Hash;
742           tie my %tie_hash => 'Tie::StdHash';
743
744           ...
745
746           local($tie_hash{Foo}) = 1; # leaks
747
748       Code like the above is known to leak memory every time the local() is
749       executed.
750
751   Self-tying of Arrays and Hashes Is Forbidden
752       Self-tying of arrays and hashes is broken in rather deep and hard-to-
753       fix ways.  As a stop-gap measure to avoid people from getting
754       frustrated at the mysterious results (core dumps, most often) it is for
755       now forbidden (you will get a fatal error even from an attempt).
756
757   Building Extensions Can Fail Because Of Largefiles
758       Some extensions like mod_perl are known to have issues with
759       `largefiles', a change brought by Perl 5.6.0 in which file offsets
760       default to 64 bits wide, where supported.  Modules may fail to compile
761       at all or compile and work incorrectly.  Currently there is no good
762       solution for the problem, but Configure now provides appropriate non-
763       largefile ccflags, ldflags, libswanted, and libs in the %Config hash
764       (e.g., $Config{ccflags_nolargefiles}) so the extensions that are having
765       problems can try configuring themselves without the largefileness.
766       This is admittedly not a clean solution, and the solution may not even
767       work at all.  One potential failure is whether one can (or, if one can,
768       whether it's a good idea) link together at all binaries with different
769       ideas about file offsets, all this is platform-dependent.
770
771   The Compiler Suite Is Still Experimental
772       The compiler suite is slowly getting better but is nowhere near working
773       order yet.
774

Reporting Bugs

776       If you find what you think is a bug, you might check the articles
777       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
778       database at http://bugs.perl.org/  There may also be information at
779       http://www.perl.com/perl/ , the Perl Home Page.
780
781       If you believe you have an unreported bug, please run the perlbug
782       program included with your release.  Be sure to trim your bug down to a
783       tiny but sufficient test case.  Your bug report, along with the output
784       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
785       the Perl porting team.
786

SEE ALSO

788       The Changes file for exhaustive details on what changed.
789
790       The INSTALL file for how to build Perl.
791
792       The README file for general stuff.
793
794       The Artistic and Copying files for copyright information.
795

HISTORY

797       Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from
798       The Perl Porters and Perl Users submitting feedback and patches.
799
800       Send omissions or corrections to <perlbug@perl.org>.
801
802
803
804perl v5.12.4                      2011-06-01                   PERL571DELTA(1)
Impressum