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 vari‐
17       ous 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 plat‐
21       forms the /bin/mail program had an undocumented feature which when com‐
22       bined with suidperl gave access to a root shell, resulting in a serious
23       compromise instead of reporting the exploit attempt.  If you don't have
24       /bin/mail, or if you have 'safe setuid scripts', or if suidperl is not
25       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: con‐
39           structs like "foo@bar" now always assume @bar is an array, whether
40           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 impor‐
52           tantly) 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 behav‐
59           iour of ignoring them by default and warning if requested was unac‐
60           ceptable 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 simi‐
79           lar 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
102       ·   File::Temp allows one to create temporary files and directories in
103           an easy, portable, and secure way.
104
105       ·   Storable gives persistence to Perl data structures by allowing the
106           storage and retrieval of Perl data to and from files in a fast and
107           compact binary format.
108
109       Updated And Improved Modules and Pragmata
110
111       ·   The following independently supported modules have been updated to
112           newer versions from CPAN: CGI, CPAN, DB_File, File::Spec,
113           Getopt::Long, the podlators bundle, Pod::LaTeX, Pod::Parser,
114           Term::ANSIColor, Test.
115
116       ·   Bug fixes and minor enhancements have been applied to B::Deparse,
117           Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat,
118           Math::Complex, Math::Trig, Net::protoent, the re pragma, Self‐
119           Loader, Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and the
120           warnings pragma.
121
122       ·   The attributes::reftype() now works on tied arguments.
123
124       ·   AutoLoader can now be disabled with "no AutoLoader;",
125
126       ·   The English module can now be used without the infamous performance
127           hit by saying
128
129                   use English '-no_performance_hit';
130
131           (Assuming, of course, that one doesn't need the troublesome vari‐
132           ables $`, $&, or $'.)  Also, introduced @LAST_MATCH_START and
133           @LAST_MATCH_END English aliases for "@-" and "@+".
134
135       ·   File::Find now has pre- and post-processing callbacks.  It also
136           correctly changes directories when chasing symbolic links.  Call‐
137           backs (naughtily) exiting with "next;" instead of "return;" now
138           work.
139
140       ·   File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid pro‐
141           totype mismatch with CORE::glob().
142
143       ·   IPC::Open3 now allows the use of numeric file descriptors.
144
145       ·   use lib now works identically to @INC.  Removing directories with
146           'no lib' now works.
147
148       ·   %INC now localised in a Safe compartment so that use/require work.
149
150       ·   The Shell module now has an OO interface.
151

Utility Changes

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

New Documentation

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

Performance Enhancements

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

Installation and Configuration Improvements

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

Selected Bug Fixes

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

New or Changed Diagnostics

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

Changed Internals

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

Known Problems

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

Reporting Bugs

567       If you find what you think is a bug, you might check the articles
568       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
569       database at http://bugs.perl.org/  There may also be information at
570       http://www.perl.com/perl/ , the Perl Home Page.
571
572       If you believe you have an unreported bug, please run the perlbug pro‐
573       gram included with your release.  Be sure to trim your bug down to a
574       tiny but sufficient test case.  Your bug report, along with the output
575       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
576       the Perl porting team.
577

SEE ALSO

579       The Changes file for exhaustive details on what changed.
580
581       The INSTALL file for how to build Perl.
582
583       The README file for general stuff.
584
585       The Artistic and Copying files for copyright information.
586

HISTORY

588       Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from
589       The Perl Porters and Perl Users submitting feedback and patches.
590
591       Send omissions or corrections to <perlbug@perl.org>.
592
593
594
595perl v5.8.8                       2006-01-07                   PERL570DELTA(1)
Impressum