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

NAME

6       perl570delta - what's new for perl v5.7.0
7

DESCRIPTION

9       This document describes differences between the 5.6.0 release and the
10       5.7.0 release.
11

Security Vulnerability Closed

13       A potential security vulnerability in the optional suidperl component
14       of Perl has been identified.  suidperl is neither built nor installed
15       by default.  As of September the 2nd, 2000, the only known vulnerable
16       platform is Linux, most likely all Linux distributions.  CERT and
17       various vendors have been alerted about the vulnerability.
18
19       The problem was caused by Perl trying to report a suspected security
20       exploit attempt using an external program, /bin/mail.  On Linux
21       platforms the /bin/mail program had an undocumented feature which when
22       combined with suidperl gave access to a root shell, resulting in a
23       serious compromise instead of reporting the exploit attempt.  If you
24       don't have /bin/mail, or if you have 'safe setuid scripts', or if
25       suidperl is not installed, you are safe.
26
27       The exploit attempt reporting feature has been completely removed from
28       the Perl 5.7.0 release, so that particular vulnerability isn't there
29       anymore.  However, further security vulnerabilities are, unfortunately,
30       always possible.  The suidperl code is being reviewed and if deemed too
31       risky to continue to be supported, it may be completely removed from
32       future releases.  In any case, suidperl should only be used by security
33       experts who know exactly what they are doing and why they are using
34       suidperl instead of some other solution such as sudo ( see
35       http://www.courtesan.com/sudo/ ).
36

Incompatible Changes

38       ·   Arrays now always interpolate into double-quoted strings:
39           constructs like "foo@bar" now always assume @bar is an array,
40           whether or not the compiler has seen use of @bar.
41
42       ·   The semantics of bless(REF, REF) were unclear and until someone
43           proves it to make some sense, it is forbidden.
44
45       ·   A reference to a reference now stringify as "REF(0x81485ec)"
46           instead of "SCALAR(0x81485ec)" in order to be more consistent with
47           the return value of ref().
48
49       ·   The very dusty examples in the eg/ directory have been removed.
50           Suggestions for new shiny examples welcome but the main issue is
51           that the examples need to be documented, tested and (most
52           importantly) maintained.
53
54       ·   The obsolete chat2 library that should never have been allowed to
55           escape the laboratory has been decommissioned.
56
57       ·   The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are
58           still recognised but now cause fatal errors.  The previous
59           behaviour of ignoring them by default and warning if requested was
60           unacceptable since it, in a way, falsely promised that the features
61           could be used.
62
63       ·   The (bogus) escape sequences \8 and \9 now give an optional warning
64           ("Unrecognized escape passed through").  There is no need to
65           \-escape any "\w" character.
66
67       ·   lstat(FILEHANDLE) now gives a warning because the operation makes
68           no sense.  In future releases this may become a fatal error.
69
70       ·   The long deprecated uppercase aliases for the string comparison
71           operators (EQ, NE, LT, LE, GE, GT) have now been removed.
72
73       ·   The regular expression captured submatches ($1, $2, ...) are now
74           more consistently unset if the match fails, instead of leaving
75           false data lying around in them.
76
77       ·   The tr///C and tr///U features have been removed and will not
78           return; the interface was a mistake.  Sorry about that.  For
79           similar functionality, see pack('U0', ...) and pack('C0', ...).
80

Core Enhancements

82       ·   "perl -d:Module=arg,arg,arg" now works (previously one couldn't
83           pass in multiple arguments.)
84
85       ·   my __PACKAGE__ $obj now works.
86
87       ·   "no Module;" now works even if there is no "sub unimport" in the
88           Module.
89
90       ·   The numerical comparison operators return "undef" if either operand
91           is a NaN.  Previously the behaviour was unspecified.
92
93       ·   "pack('U0a*', ...)" can now be used to force a string to UTF-8.
94
95       ·   prototype(\&) is now available.
96
97       ·   There is now an UNTIE method.
98

Modules and Pragmata

100   New Modules
101       ·   File::Temp allows one to create temporary files and directories in
102           an easy, portable, and secure way.
103
104       ·   Storable gives persistence to Perl data structures by allowing the
105           storage and retrieval of Perl data to and from files in a fast and
106           compact binary format.
107
108   Updated And Improved Modules and Pragmata
109       ·   The following independently supported modules have been updated to
110           newer versions from CPAN: CGI, CPAN, DB_File, File::Spec,
111           Getopt::Long, the podlators bundle, Pod::LaTeX, Pod::Parser,
112           Term::ANSIColor, Test.
113
114       ·   Bug fixes and minor enhancements have been applied to B::Deparse,
115           Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat,
116           Math::Complex, Math::Trig, Net::protoent, the re pragma,
117           SelfLoader, Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and
118           the warnings pragma.
119
120       ·   The attributes::reftype() now works on tied arguments.
121
122       ·   AutoLoader can now be disabled with "no AutoLoader;",
123
124       ·   The English module can now be used without the infamous performance
125           hit by saying
126
127                   use English '-no_performance_hit';
128
129           (Assuming, of course, that one doesn't need the troublesome
130           variables "$`", $&, or "$'".)  Also, introduced @LAST_MATCH_START
131           and @LAST_MATCH_END English aliases for "@-" and "@+".
132
133       ·   File::Find now has pre- and post-processing callbacks.  It also
134           correctly changes directories when chasing symbolic links.
135           Callbacks (naughtily) exiting with "next;" instead of "return;" now
136           work.
137
138       ·   File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid
139           prototype mismatch with CORE::glob().
140
141       ·   IPC::Open3 now allows the use of numeric file descriptors.
142
143       ·   use lib now works identically to @INC.  Removing directories with
144           'no lib' now works.
145
146       ·   %INC now localised in a Safe compartment so that use/require work.
147
148       ·   The Shell module now has an OO interface.
149

Utility Changes

151       ·   The Emacs perl mode (emacs/cperl-mode.el) has been updated to
152           version 4.31.
153
154       ·   Perlbug is now much more robust.  It also sends the bug report to
155           perl.org, not perl.com.
156
157       ·   The perlcc utility has been rewritten and its user interface (that
158           is, command line) is much more like that of the UNIX C compiler,
159           cc.
160
161       ·   The xsubpp utility for extension writers now understands POD
162           documentation embedded in the *.xs files.
163

New Documentation

165       ·   perl56delta details the changes between the 5.005 release and the
166           5.6.0 release.
167
168       ·   perldebtut is a Perl debugging tutorial.
169
170       ·   perlebcdic contains considerations for running Perl on EBCDIC
171           platforms.  Note that unfortunately EBCDIC platforms that used to
172           supported back in Perl 5.005 are still unsupported by Perl 5.7.0;
173           the plan, however, is to bring them back to the fold.
174
175       ·   perlnewmod tells about writing and submitting a new module.
176
177       ·   perlposix-bc explains using Perl on the POSIX-BC platform (an
178           EBCDIC mainframe platform).
179
180       ·   perlretut is a regular expression tutorial.
181
182       ·   perlrequick is a regular expressions quick-start guide.  Yes, much
183           quicker than perlretut.
184
185       ·   perlutil explains the command line utilities packaged with the Perl
186           distribution.
187

Performance Enhancements

189       ·   map() that changes the size of the list should now work faster.
190
191       ·   sort() has been changed to use mergesort internally as opposed to
192           the earlier quicksort.  For very small lists this may result in
193           slightly slower sorting times, but in general the speedup should be
194           at least 20%.  Additional bonuses are that the worst case behaviour
195           of sort() is now better (in computer science terms it now runs in
196           time O(N log N), as opposed to quicksort's Theta(N**2) worst-case
197           run time behaviour), and that sort() is now stable (meaning that
198           elements with identical keys will stay ordered as they were before
199           the sort).
200

Installation and Configuration Improvements

202   Generic Improvements
203       ·   INSTALL now explains how you can configure Perl to use 64-bit
204           integers even on non-64-bit platforms.
205
206       ·   Policy.sh policy change: if you are reusing a Policy.sh file (see
207           INSTALL) and you use Configure -Dprefix=/foo/bar and in the old
208           Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of
209           them will now be changed to the new prefix, /foo/bar.  (Previously
210           only $prefix changed.)  If you do not like this new behaviour,
211           specify prefix, siteprefix, and vendorprefix explicitly.
212
213       ·   A new optional location for Perl libraries, otherlibdirs, is
214           available.  It can be used for example for vendor add-ons without
215           disturbing Perl's own library directories.
216
217       ·   In many platforms the vendor-supplied 'cc' is too stripped-down to
218           build Perl (basically, 'cc' doesn't do ANSI C).  If this seems to
219           be the case and 'cc' does not seem to be the GNU C compiler 'gcc',
220           an automatic attempt is made to find and use 'gcc' instead.
221
222       ·   gcc needs to closely track the operating system release to avoid
223           build problems. If Configure finds that gcc was built for a
224           different operating system release than is running, it now gives a
225           clearly visible warning that there may be trouble ahead.
226
227       ·   If binary compatibility with the 5.005 release is not wanted,
228           Configure no longer suggests including the 5.005 modules in @INC.
229
230       ·   Configure "-S" can now run non-interactively.
231
232       ·   configure.gnu now works with options with whitespace in them.
233
234       ·   installperl now outputs everything to STDERR.
235
236       ·   $Config{byteorder} is now computed dynamically (this is more robust
237           with "fat binaries" where an executable image contains binaries for
238           more than one binary platform.)
239

Selected Bug Fixes

241       ·   Several debugger fixes: exit code now reflects the script exit
242           code, condition "0" now treated correctly, the "d" command now
243           checks line number, the $. no longer gets corrupted, all debugger
244           output now goes correctly to the socket if RemotePort is set.
245
246       ·   *foo{FORMAT} now works.
247
248       ·   Lexical warnings now propagating correctly between scopes.
249
250       ·   Line renumbering with eval and "#line" now works.
251
252       ·   Fixed numerous memory leaks, especially in eval "".
253
254       ·   Modulus of unsigned numbers now works (4063328477 % 65535 used to
255           return 27406, instead of 27047).
256
257       ·   Some "not a number" warnings introduced in 5.6.0 eliminated to be
258           more compatible with 5.005.  Infinity is now recognised as a
259           number.
260
261       ·   our() variables will not cause "will not stay shared" warnings.
262
263       ·   pack "Z" now correctly terminates the string with "\0".
264
265       ·   Fix password routines which in some shadow password platforms (e.g.
266           HP-UX) caused getpwent() to return every other entry.
267
268       ·   printf() no longer resets the numeric locale to "C".
269
270       ·   "q(a\\b)" now parses correctly as 'a\\b'.
271
272       ·   Printing quads (64-bit integers) with printf/sprintf now works
273           without the q L ll prefixes (assuming you are on a quad-capable
274           platform).
275
276       ·   Regular expressions on references and overloaded scalars now work.
277
278       ·   scalar() now forces scalar context even when used in void context.
279
280       ·   sort() arguments are now compiled in the right wantarray context
281           (they were accidentally using the context of the sort() itself).
282
283       ·   Changed the POSIX character class "[[:space:]]" to include the
284           (very rare) vertical tab character.  Added a new POSIX-ish
285           character class "[[:blank:]]" which stands for horizontal
286           whitespace (currently, the space and the tab).
287
288       ·   $AUTOLOAD, sort(), lock(), and spawning subprocesses in multiple
289           threads simultaneously are now thread-safe.
290
291       ·   Allow read-only string on left hand side of non-modifying tr///.
292
293       ·   Several Unicode fixes (but still not perfect).
294
295           ·       BOMs (byte order marks) in the beginning of Perl files
296                   (scripts, modules) should now be transparently skipped.
297                   UTF-16 (UCS-2) encoded Perl files should now be read
298                   correctly.
299
300           ·       The character tables have been updated to Unicode 3.0.1.
301
302           ·       chr() for values greater than 127 now create utf8 when
303                   under use utf8.
304
305           ·       Comparing with utf8 data does not magically upgrade
306                   non-utf8 data into utf8.
307
308           ·       "IsAlnum", "IsAlpha", and "IsWord" now match titlecase.
309
310           ·       Concatenation with the "." operator or via variable
311                   interpolation, "eq", "substr", "reverse", "quotemeta", the
312                   "x" operator, substitution with "s///", single-quoted
313                   UTF-8, should now work--in theory.
314
315           ·       The "tr///" operator now works slightly better but is still
316                   rather broken.  Note that the "tr///CU" functionality has
317                   been removed (but see pack('U0', ...)).
318
319           ·       vec() now refuses to deal with characters >255.
320
321           ·       Zero entries were missing from the Unicode classes like
322                   "IsDigit".
323
324       ·   UNIVERSAL::isa no longer caches methods incorrectly.  (This broke
325           the Tk extension with 5.6.0.)
326
327   Platform Specific Changes and Fixes
328       ·   BSDI 4.*
329
330           Perl now works on post-4.0 BSD/OSes.
331
332       ·   All BSDs
333
334           Setting $0 now works (as much as possible; see perlvar for
335           details).
336
337       ·   Cygwin
338
339           Numerous updates; currently synchronised with Cygwin 1.1.4.
340
341       ·   EPOC
342
343           EPOC update after Perl 5.6.0.  See README.epoc.
344
345       ·   FreeBSD 3.*
346
347           Perl now works on post-3.0 FreeBSDs.
348
349       ·   HP-UX
350
351           README.hpux updated; "Configure -Duse64bitall" now almost works.
352
353       ·   IRIX
354
355           Numerous compilation flag and hint enhancements; accidental mixing
356           of 32-bit and 64-bit libraries (a doomed attempt) made much harder.
357
358       ·   Linux
359
360           Long doubles should now work (see INSTALL).
361
362       ·   Mac OS Classic
363
364           Compilation of the standard Perl distribution in Mac OS Classic
365           should now work if you have the Metrowerks development environment
366           and the missing Mac-specific toolkit bits.  Contact the macperl
367           mailing list for details.
368
369       ·   MPE/iX
370
371           MPE/iX update after Perl 5.6.0.  See README.mpeix.
372
373       ·   NetBSD/sparc
374
375           Perl now works on NetBSD/sparc.
376
377       ·   OS/2
378
379           Now works with usethreads (see INSTALL).
380
381       ·   Solaris
382
383           64-bitness using the Sun Workshop compiler now works.
384
385       ·   Tru64 (aka Digital UNIX, aka DEC OSF/1)
386
387           The operating system version letter now recorded in
388           $Config{osvers}.  Allow compiling with gcc (previously explicitly
389           forbidden).  Compiling with gcc still not recommended because buggy
390           code results, even with gcc 2.95.2.
391
392       ·   Unicos
393
394           Fixed various alignment problems that lead into core dumps either
395           during build or later; no longer dies on math errors at runtime;
396           now using full quad integers (64 bits), previously was using only
397           46 bit integers for speed.
398
399       ·   VMS
400
401           chdir() now works better despite a CRT bug; now works with
402           MULTIPLICITY (see INSTALL); now works with Perl's malloc.
403
404       ·   Windows
405
406           ·       accept() no longer leaks memory.
407
408           ·       Better chdir() return value for a non-existent directory.
409
410           ·       New %ENV entries now propagate to subprocesses.
411
412           ·       $ENV{LIB} now used to search for libs under Visual C.
413
414           ·       A failed (pseudo)fork now returns undef and sets errno to
415                   EAGAIN.
416
417           ·       Allow REG_EXPAND_SZ keys in the registry.
418
419           ·       Can now send() from all threads, not just the first one.
420
421           ·       Fake signal handling reenabled, bugs and all.
422
423           ·       Less stack reserved per thread so that more threads can run
424                   concurrently. (Still 16M per thread.)
425
426           ·       "File::Spec->tmpdir()" now prefers C:/temp over /tmp (works
427                   better when perl is running as service).
428
429           ·       Better UNC path handling under ithreads.
430
431           ·       wait() and waitpid() now work much better.
432
433           ·       winsock handle leak fixed.
434

New or Changed Diagnostics

436       All regular expression compilation error messages are now hopefully
437       easier to understand both because the error message now comes before
438       the failed regex and because the point of failure is now clearly
439       marked.
440
441       The various "opened only for", "on closed", "never opened" warnings
442       drop the "main::" prefix for filehandles in the "main" package, for
443       example "STDIN" instead of <main::STDIN>.
444
445       The "Unrecognized escape" warning has been extended to include "\8",
446       "\9", and "\_".  There is no need to escape any of the "\w" characters.
447

Changed Internals

449       ·   perlapi.pod (a companion to perlguts) now attempts to document the
450           internal API.
451
452       ·   You can now build a really minimal perl called microperl.  Building
453           microperl does not require even running Configure; "make -f
454           Makefile.micro" should be enough.  Beware: microperl makes many
455           assumptions, some of which may be too bold; the resulting
456           executable may crash or otherwise misbehave in wondrous ways.  For
457           careful hackers only.
458
459       ·   Added rsignal(), whichsig(), do_join() to the publicised API.
460
461       ·   Made possible to propagate customised exceptions via croak()ing.
462
463       ·   Added is_utf8_char(), is_utf8_string(), bytes_to_utf8(), and
464           utf8_to_bytes().
465
466       ·   Now xsubs can have attributes just like subs.
467

Known Problems

469   Unicode Support Still Far From Perfect
470       We're working on it.  Stay tuned.
471
472   EBCDIC Still A Lost Platform
473       The plan is to bring them back.
474
475   Building Extensions Can Fail Because Of Largefiles
476       Certain extensions like mod_perl and BSD::Resource are known to have
477       issues with `largefiles', a change brought by Perl 5.6.0 in which file
478       offsets default to 64 bits wide, where supported.  Modules may fail to
479       compile at all or compile and work incorrectly.  Currently there is no
480       good solution for the problem, but Configure now provides appropriate
481       non-largefile ccflags, ldflags, libswanted, and libs in the %Config
482       hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
483       having problems can try configuring themselves without the
484       largefileness.  This is admittedly not a clean solution, and the
485       solution may not even work at all.  One potential failure is whether
486       one can (or, if one can, whether it's a good idea) link together at all
487       binaries with different ideas about file offsets, all this is platform-
488       dependent.
489
490   ftmp-security tests warn 'system possibly insecure'
491       Don't panic.  Read INSTALL 'make test' section instead.
492
493   Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
494       If perl is configured with -Duse64bitall, the successful result of the
495       subtest 10 of lib/posix may arrive before the successful result of the
496       subtest 9, which confuses the test harness so much that it thinks the
497       subtest 9 failed.
498
499   Long Doubles Still Don't Work In Solaris
500       The experimental long double support is still very much so in Solaris.
501       (Other platforms like Linux and Tru64 are beginning to solidify in this
502       area.)
503
504   Linux With Sfio Fails op/misc Test 48
505       No known fix.
506
507   Storable tests fail in some platforms
508       If any Storable tests fail the use of Storable is not advisable.
509
510       ·   Many Storable tests fail on AIX configured with 64 bit integers.
511
512           So far unidentified problems break Storable in AIX if Perl is
513           configured to use 64 bit integers.  AIX in 32-bit mode works and
514           other 64-bit platforms work with Storable.
515
516       ·   DOS DJGPP may hang when testing Storable.
517
518       ·   st-06compat fails in UNICOS and UNICOS/mk.
519
520           This means that you cannot read old (pre-Storable-0.7) Storable
521           images made in other platforms.
522
523       ·   st-store.t and st-retrieve may fail with Compaq C 6.2 on OpenVMS
524           Alpha 7.2.
525
526   Threads Are Still Experimental
527       Multithreading is still an experimental feature.  Some platforms emit
528       the following message for lib/thr5005
529
530           #
531           # This is a KNOWN FAILURE, and one of the reasons why threading
532           # is still an experimental feature.  It is here to stop people
533           # from deploying threads in production. ;-)
534           #
535
536       and another known thread-related warning is
537
538          pragma/overload......Unbalanced saves: 3 more saves than restores
539          panic: magic_mutexfree during global destruction.
540          ok
541          lib/selfloader.......Unbalanced saves: 3 more saves than restores
542          panic: magic_mutexfree during global destruction.
543          ok
544          lib/st-dclone........Unbalanced saves: 3 more saves than restores
545          panic: magic_mutexfree during global destruction.
546          ok
547
548   The Compiler Suite Is Still Experimental
549       The compiler suite is slowly getting better but is nowhere near working
550       order yet.  The backend part that has seen perhaps the most progress is
551       the bytecode compiler.
552

Reporting Bugs

554       If you find what you think is a bug, you might check the articles
555       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
556       database at http://bugs.perl.org/  There may also be information at
557       http://www.perl.com/perl/ , the Perl Home Page.
558
559       If you believe you have an unreported bug, please run the perlbug
560       program included with your release.  Be sure to trim your bug down to a
561       tiny but sufficient test case.  Your bug report, along with the output
562       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
563       the Perl porting team.
564

SEE ALSO

566       The Changes file for exhaustive details on what changed.
567
568       The INSTALL file for how to build Perl.
569
570       The README file for general stuff.
571
572       The Artistic and Copying files for copyright information.
573

HISTORY

575       Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from
576       The Perl Porters and Perl Users submitting feedback and patches.
577
578       Send omissions or corrections to <perlbug@perl.org>.
579
580
581
582perl v5.10.1                      2009-02-12                   PERL570DELTA(1)
Impressum