Regen toc.
[p5sagit/p5-mst-13.2.git] / pod / perl571delta.pod
CommitLineData
d468ca04 1=head1 NAME
2
3perl571delta - what's new for perl v5.7.1
4
5=head1 DESCRIPTION
6
7This document describes differences between the 5.7.0 release and the
85.7.1 release.
9
10(To view the differences between the 5.6.0 release and the 5.7.0
11release, see L<perl570delta>).
12
6a9b4349 13=head1 Security Vulnerability Closed
14
15(This change was already made in 5.7.0 but bears repeating here.)
16
17A potential security vulnerability in the optional suidperl component
18of Perl was identified in August 2000. suidperl is neither built nor
19installed by default. As of April 2001 the only known vulnerable
20platform is Linux, most likely all Linux distributions. CERT and
21various vendors and distributors have been alerted about the vulnerability.
22See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
23for more information.
24
25The problem was caused by Perl trying to report a suspected security
26exploit attempt using an external program, /bin/mail. On Linux
27platforms the /bin/mail program had an undocumented feature which
28when combined with suidperl gave access to a root shell, resulting in
29a serious compromise instead of reporting the exploit attempt. If you
30don't have /bin/mail, or if you have 'safe setuid scripts', or if
31suidperl is not installed, you are safe.
32
33The exploit attempt reporting feature has been completely removed from
34all the Perl 5.7 releases (and will be gone also from the maintenance
35release 5.6.1), so that particular vulnerability isn't there anymore.
36However, further security vulnerabilities are, unfortunately, always
37possible. The suidperl code is being reviewed and if deemed too risky
38to continue to be supported, it may be completely removed from future
39releases. In any case, suidperl should only be used by security
40experts who know exactly what they are doing and why they are using
41suidperl instead of some other solution such as sudo (see
42http://www.courtesan.com/sudo/).
43
d468ca04 44=head1 Incompatible Changes
45
46=over 4
47
48=item *
49
50Although "you shouldn't do that", it was possible to write code that
51depends on Perl's hashed key order (Data::Dumper does this). The new
52algorithm "One-at-a-Time" produces a different hashed key order.
6a9b4349 53More details are in L</"Performance Enhancements">.
54
55=item *
56
57The list of filenames from glob() (or <...>) is now by default sorted
58alphabetically to be csh-compliant. (bsd_glob() does still sort platform
59natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)
d468ca04 60
61=back
62
63=head1 Core Enhancements
64
65=over 4
66
67=item *
68
66917b5b 69AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
70to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.
65db4721 71
72=item *
73
74IO is now by default done via PerlIO rather than system's "stdio".
75PerlIO allows "layers" to be "pushed" onto a file handle to alter the
76handle's behaviour. Layers can be specified at open time via 3-arg
77form of open:
78
79 open($fh,'>:crlf :utf8', $path) || ...
80
81or on already opened handles via extended C<binmode>:
82
83 binmode($fh,':encoding(iso-8859-7)');
84
85The built-in layers are: unix (low level read/write), stdio (as in
86previous Perls), perlio (re-implementation of stdio buffering in a
87portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
88but available on any platform). A mmap layer may be available if
89platform supports it (mostly UNIXes).
90
91Layers to be applied by default may be specified via the 'open' pragma.
92
6a9b4349 93See L</"Installation and Configuration Improvements"> for the effects
94of PerlIO on your architecture name.
95
65db4721 96=item *
97
98File handles can be marked as accepting Perl's internal encoding of Unicode
e49a87d3 99(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
65db4721 100
101 open($fh,">:utf8","Uni.txt");
102
7221edc9 103Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
104for you since it's not UTF-8 what you will be getting but instead
105UTF-EBCDIC. See L<perlunicode>, L<utf8>, and
106http://www.unicode.org/unicode/reports/tr16/ for more information.
107In future releases this naming may change.
66917b5b 108
65db4721 109=item *
110
111File handles can translate character encodings from/to Perl's internal
112Unicode form on read/write via the ":encoding()" layer.
113
114=item *
115
116File handles can be opened to "in memory" files held in Perl scalars via:
117
118 open($fh,'>', \$variable) || ...
119
120=item *
121
6a9b4349 122Anonymous temporary files are available without need to
123'use FileHandle' or other module via
124
125 open($fh,"+>", undef) || ...
126
127That is a literal undef, not an undefined value.
d468ca04 128
129=item *
65db4721 130
131The list form of C<open> is now implemented for pipes (at least on UNIX):
132
133 open($fh,"-|", 'cat', '/etc/motd')
134
135creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
136the child process.
137
138=item *
6a9b4349 139
31d2fa6a 140The following builtin functions are now overridable: chop(), chomp(),
66917b5b 141each(), keys(), pop(), push(), shift(), splice(), unshift().
6a9b4349 142
143=item *
144
145Formats now support zero-padded decimal fields.
146
147=item *
148
149Perl now tries internally to use integer values in numeric conversions
150and basic arithmetics (+ - * /) if the arguments are integers, and
151tries also to keep the results stored internally as integers.
152This change leads into often slightly faster and always less lossy
3a2c142b 153arithmetics. (Previously Perl always preferred floating point numbers
154in its math.)
6a9b4349 155
156=item *
3b131e01 157
66917b5b 158The printf() and sprintf() now support parameter reordering using the
159C<%\d+\$> and C<*\d+\$> syntaxes. For example
160
161 print "%2\$s %1\$s\n", "foo", "bar";
162
163will print "bar foo\n"; This feature helps in writing
164internationalised software.
d468ca04 165
6a9b4349 166=item *
167
168Unicode in general should be now much more usable. Unicode can be
169used in hash keys, Unicode in regular expressions should work now,
170Unicode in tr/// should work now (though tr/// seems to be a
171particularly tricky to get right, so you have been warned)
172
173=item *
174
175The Unicode Character Database coming with Perl has been upgraded
66917b5b 176to Unicode 3.1. For more information, see http://www.unicode.org/,
177and http://www.unicode.org/unicode/reports/tr27/
178
31d2fa6a 179For developers interested in enhancing Perl's Unicode capabilities:
66917b5b 180almost all the UCD files are included with the Perl distribution in
181the lib/unicode subdirectory. The most notable omission, for space
182considerations, is the Unihan database.
6a9b4349 183
184=item *
185
186The Unicode character classes \p{Blank} and \p{SpacePerl} have been
187added. "Blank" is like C isblank(), that is, it contains only
188"horizontal whitespace" (the space character is, the newline isn't),
189and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space}
190isn't, since that includes the vertical tabulator character, whereas
191C<\s> doesn't.)
192
193=back
194
3b131e01 195=head1 Modules and Pragmata
6a9b4349 196
197=head2 New Modules
198
199=over 4
200
201=item *
202
7221edc9 203B::Concise, by Stephen McCamant, is a new compiler backend for
31d2fa6a 204walking the Perl syntax tree, printing concise info about ops.
205The output is highly customisable.
206
207See L<B::Concise> for more information.
6a9b4349 208
209=item *
210
7221edc9 211Class::ISA, by Sean Burke, for reporting the search path for a
212class's ISA tree, has been added.
6a9b4349 213
31d2fa6a 214See L<Class::ISA> for more information.
215
6a9b4349 216=item *
217
218Cwd has now a split personality: if possible, an extension is used,
219(this will hopefully be both faster and more secure and robust) but
220if not possible, the familiar Perl library implementation is used.
221
222=item *
223
8b40ef3a 224Digest, a frontend module for calculating digests (checksums),
6a9b4349 225from Gisle Aas, has been added.
226
31d2fa6a 227See L<Digest> for more information.
228
6a9b4349 229=item *
230
7221edc9 231Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas,
6a9b4349 232has been added.
233
3b131e01 234 use Digest::MD5 'md5_hex';
235
236 $digest = md5_hex("Thirsty Camel");
237
238 print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
239
3a2c142b 240NOTE: the MD5 backward compatibility module is deliberately not
6a9b4349 241included since its use is discouraged.
242
31d2fa6a 243See L<Digest::MD5> for more information.
244
6a9b4349 245=item *
246
7221edc9 247Encode, by Nick Ing-Simmons, provides a mechanism to translate
31d2fa6a 248between different character encodings. Support for Unicode,
249ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are
250compiled in to the module. Several other encodings (like Japanese,
251Chinese, and MacIntosh encodings) are included and will be loaded at
252runtime.
6a9b4349 253
254Any encoding supported by Encode module is also available to the
255":encoding()" layer if PerlIO is used.
256
31d2fa6a 257See L<Encode> for more information.
258
6a9b4349 259=item *
260
8b40ef3a 261Filter::Simple is an easy-to-use frontend to Filter::Util::Call,
6a9b4349 262from Damian Conway.
263
3b131e01 264 # in MyFilter.pm:
265
266 package MyFilter;
267
268 use Filter::Simple sub {
269 while (my ($from, $to) = splice @_, 0, 2) {
270 s/$from/$to/g;
271 }
272 };
273
274 1;
275
276 # in user's code:
277
278 use MyFilter qr/red/ => 'green';
279
280 print "red\n"; # this code is filtered, will print "green\n"
281 print "bored\n"; # this code is filtered, will print "bogreen\n"
282
283 no MyFilter;
284
285 print "red\n"; # this code is not filtered, will print "red\n"
286
31d2fa6a 287See L<Filter::Simple> for more information.
288
6a9b4349 289=item *
290
7221edc9 291Filter::Util::Call, by Paul Marquess, provides you with the
6a9b4349 292framework to write I<Source Filters> in Perl. For most uses
8b40ef3a 293the frontend Filter::Simple is to be preferred.
31d2fa6a 294See L<Filter::Util::Call> for more information.
6a9b4349 295
296=item *
297
298Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language,
299from Neil Bowers, have been added. They provide the codes for various
300locale standards, such as "fr" for France, "usd" for US Dollar, and
301"jp" for Japanese.
302
3b131e01 303 use Locale::Country;
31d2fa6a 304
3b131e01 305 $country = code2country('jp'); # $country gets 'Japan'
306 $code = country2code('Norway'); # $code gets 'no'
307
31d2fa6a 308See L<Locale::Constants>, L<Locale::Country>, L<Locale::Currency>,
309and L<Locale::Language> for more information.
310
6a9b4349 311=item *
312
7221edc9 313MIME::Base64, by Gisle Aas, allows you to encode data in base64.
6a9b4349 314
3b131e01 315 use MIME::Base64;
316
317 $encoded = encode_base64('Aladdin:open sesame');
318 $decoded = decode_base64($encoded);
319
320 print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
321
31d2fa6a 322See L<MIME::Base64> for more information.
323
6a9b4349 324=item *
325
7221edc9 326MIME::QuotedPrint, by Gisle Aas, allows you to encode data in
6a9b4349 327quoted-printable encoding.
328
3b131e01 329 use MIME::QuotedPrint;
330
331 $encoded = encode_qp("Smiley in Unicode: \x{263a}");
332 $decoded = decode_qp($encoded);
333
334 print $encoded, "\n"; # "Smiley in Unicode: =263A"
335
6a9b4349 336MIME::QuotedPrint has been enhanced to provide the basic methods
337necessary to use it with PerlIO::Via as in :
338
3b131e01 339 use MIME::QuotedPrint;
340 open($fh,">Via(MIME::QuotedPrint)",$path)
6a9b4349 341
31d2fa6a 342See L<MIME::QuotedPrint> for more information.
343
6a9b4349 344=item *
345
7221edc9 346PerlIO::Scalar, by Nick Ing-Simmons, provides the implementation of
31d2fa6a 347IO to "in memory" Perl scalars as discussed above. It also serves as
348an example of a loadable layer. Other future possibilities include
349PerlIO::Array and PerlIO::Code. See L<PerlIO::Scalar> for more
350information.
6a9b4349 351
352=item *
353
7221edc9 354PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
31d2fa6a 355PerlIO layer functionality provided by a class (typically implemented
356in perl code).
6a9b4349 357
3b131e01 358 use MIME::QuotedPrint;
359 open($fh,">Via(MIME::QuotedPrint)",$path)
360
361This will automatically convert everything output to C<$fh>
31d2fa6a 362to Quoted-Printable. See L<PerlIO::Via> for more information.
3b131e01 363
6a9b4349 364=item *
365
7221edc9 366Pod::Text::Overstrike, by Joe Smith, has been added.
6a9b4349 367It converts POD data to formatted overstrike text.
31d2fa6a 368See L<Pod::Text::Overstrike> for more information.
6a9b4349 369
370=item *
371
66917b5b 372Switch from Damian Conway has been added. Just by saying
6a9b4349 373
66917b5b 374 use Switch;
6a9b4349 375
66917b5b 376you have C<switch> and C<case> available in Perl.
6a9b4349 377
3b131e01 378 use Switch;
379
380 switch ($val) {
381
382 case 1 { print "number 1" }
383 case "a" { print "string a" }
384 case [1..10,42] { print "number in list" }
385 case (@array) { print "number in list" }
386 case /\w+/ { print "pattern" }
387 case qr/\w+/ { print "pattern" }
388 case (%hash) { print "entry in hash" }
389 case (\%hash) { print "entry in hash" }
390 case (\&sub) { print "arg to subroutine" }
391 else { print "previous case not true" }
392 }
393
31d2fa6a 394See L<Switch> for more information.
395
6a9b4349 396=item *
397
398Text::Balanced from Damian Conway has been added, for
399extracting delimited text sequences from strings.
400
3b131e01 401 use Text::Balanced 'extract_delimited';
31d2fa6a 402
3b131e01 403 ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
404
7221edc9 405$a will be "'never say never'", $b will be ', he never said'.
3b131e01 406
407In addition to extract_delimited() there are also extract_bracketed(),
408extract_quotelike(), extract_codeblock(), extract_variable(),
409extract_tagged(), extract_multiple(), gen_delimited_pat(), and
7221edc9 410gen_extract_tagged(). With these you can implement rather advanced
411parsing algorithms. See L<Text::Balanced> for more information.
3b131e01 412
6a9b4349 413=item *
414
7221edc9 415Tie::RefHash::Nestable, by Edward Avis, allows storing hash references
31d2fa6a 416(unlike the standard Tie::Refhash) The module is contained within
417Tie::RefHash.
6a9b4349 418
419=item *
420
7221edc9 421XS::Typemap, by Tim Jenness, is a test extension that exercises XS
422typemaps. Nothing gets installed but for extension writers the code
423is worth studying.
6a9b4349 424
425=back
426
427=head2 Updated And Improved Modules and Pragmata
428
429=over 4
430
431=item *
432
3b131e01 433B::Deparse should be now more robust. It still far from providing a full
31d2fa6a 434round trip for any random piece of Perl code, though, and is under active
3b131e01 435development: expect more robustness in 5.7.2.
6a9b4349 436
437=item *
438
3b131e01 439Class::Struct can now define the classes in compile time.
6a9b4349 440
441=item *
442
31d2fa6a 443Math::BigFloat has undergone much fixing, and in addition the fmod()
444function now supports modulus operations.
3b131e01 445
446(The fixed Math::BigFloat module is also available in CPAN for those
447who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/)
6a9b4349 448
449=item *
450
451Devel::Peek now has an interface for the Perl memory statistics
452(this works only if you are using perl's malloc, and if you have
453compiled with debugging).
454
455=item *
456
457IO::Socket has now atmark() method, which returns true if the socket
458is positioned at the out-of-band mark. The method is also exportable
459as a sockatmark() function.
460
3b131e01 461=item *
6a9b4349 462
463IO::Socket::INET has support for ReusePort option (if your platform
3b131e01 464supports it). The Reuse option now has an alias, ReuseAddr. For clarity
465you may want to prefer ReuseAddr.
6a9b4349 466
467=item *
468
3b131e01 469Net::Ping has been enhanced. There is now "external" protocol which
470uses Net::Ping::External module which runs external ping(1) and parses
471the output. An alpha version of Net::Ping::External is available in
472CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl.
6a9b4349 473
474=item *
475
476The C<open> pragma allows layers other than ":raw" and ":crlf" when
477using PerlIO.
478
479=item *
480
481POSIX::sigaction() is now much more flexible and robust.
3b131e01 482You can now install coderef handlers, 'DEFAULT', and 'IGNORE'
483handlers, installing new handlers was not atomic.
6a9b4349 484
485=item *
486
487The Test module has been significantly enhanced. Its use is
488greatly recommended for module writers.
489
490=item *
491
492The utf8:: name space (as in the pragma) provides various
493Perl-callable functions to provide low level access to Perl's
494internal Unicode representation. At the moment only length()
495has been implemented.
496
d468ca04 497=back
498
66917b5b 499The following modules have been upgraded from the versions at CPAN:
7221edc9 500CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text,
3b131e01 501Storable, Text-Tabs+Wrap.
6a9b4349 502
d468ca04 503=head1 Performance Enhancements
504
505=over 4
506
507=item *
508
509Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
7221edc9 510(http://burtleburtle.net/bob/hash/doobs.html). This algorithm is
511reasonably fast while producing a much better spread of values than
512the old hashing algorithm (originally by Chris Torek, later tweaked by
513Ilya Zakharevich). Hash values output from the algorithm on a hash of
514all 3-char printable ASCII keys comes much closer to passing the
515DIEHARD random number generation tests. According to perlbench, this
516change has not affected the overall speed of Perl.
d468ca04 517
6a9b4349 518=item *
519
520unshift() should now be noticeably faster.
521
d468ca04 522=back
523
6a9b4349 524=head1 Utility Changes
525
526=over 4
527
528=item *
529
530h2xs now produces template README.
531
532=item *
533
534s2p has been completely rewritten in Perl. (It is in fact a full
535implementation of sed in Perl.)
536
537=item *
538
539xsubpp now supports OUT keyword.
540
541=back
542
543=head1 New Documentation
544
545=head2 perlclib
546
547Internal replacements for standard C library functions.
66917b5b 548(Interesting only for extension writers and Perl core hackers.)
6a9b4349 549
550=head2 perliol
551
552Internals of PerlIO with layers.
553
554=head2 README.aix
555
556Documentation on compiling Perl on AIX has been added. AIX has
e49a87d3 557several different C compilers and getting the right patch level
6a9b4349 558is essential. On install README.aix will be installed as L<perlaix>.
559
560=head2 README.bs2000
561
e49a87d3 562Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC
6a9b4349 563mainframe environment) has been added.
564
565This was formerly known as README.posix-bc but the name was considered
566to be too confusing (it has nothing to do with the POSIX module or the
567POSIX standard). On install README.bs2000 will be installed as L<perlbs2000>.
568
569=head2 README.macos
570
571In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been
8b40ef3a 572synchronised with the standard Perl sources. To compile MacPerl
6a9b4349 573some additional steps are required, and this file documents those
574steps. On install README.macos will be installed as L<perlmacos>.
575
576=head2 README.mpeix
577
578The README.mpeix has been podified, which means that this information
579about compiling and using Perl on the MPE/iX miniframe platform will
66917b5b 580be installed as L<perlmpeix>.
6a9b4349 581
582=head2 README.solaris
583
584README.solaris has been created and Solaris wisdom from elsewhere
585in the Perl documentation has been collected there. On install
586README.solaris will be installed as L<perlsolaris>.
587
588=head2 README.vos
589
590The README.vos has been podified, which means that this information
66917b5b 591about compiling and using Perl on the Stratus VOS miniframe platform
592will be installed as L<perlvos>.
6a9b4349 593
594=head2 Porting/repository.pod
595
596Documentation on how to use the Perl source repository has been added.
597
d468ca04 598=head1 Installation and Configuration Improvements
599
66917b5b 600=over 4
601
602=item *
603
6a9b4349 604Because PerlIO is now the default on most platforms, "-perlio" doesn't
605get appended to the $Config{archname} (also known as $^O) anymore.
606Instead, if you explicitly choose not to use perlio (Configure command
607line option -Uuseperlio), you will get "-stdio" appended.
608
66917b5b 609=item *
610
6a9b4349 611Another change related to the architecture name is that "-64all"
3b131e01 612(-Duse64bitall, or "maximally 64-bit") is appended only if your
613pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
6a9b4349 614
66917b5b 615=item *
616
6a9b4349 617APPLLIB_EXP, a less-know configuration-time definition, has been
618documented. It can be used to prepend site-specific directories
619to Perl's default search path (@INC), see INSTALL for information.
620
66917b5b 621=item *
622
6a9b4349 623Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM
624has been documented in INSTALL.
625
66917b5b 626=item *
627
6a9b4349 628If you are on IRIX or Tru64 platforms, new profiling/debugging options
3b131e01 629have been added, see L<perlhack> for more information about pixie and
6a9b4349 630Third Degree.
631
66917b5b 632=back
633
6a9b4349 634=head2 New Or Improved Platforms
635
66917b5b 636For the list of platforms known to support Perl,
637see L<perlport/"Supported Platforms">.
638
6a9b4349 639=over 4
640
641=item *
642
643AIX dynamic loading should be now better supported.
644
645=item *
646
66917b5b 647After a long pause, AmigaOS has been verified to be happy with Perl.
648
649=item *
650
651EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA)
652have been regained. Many test suite tests still fail and the
653co-existence of Unicode and EBCDIC isn't quite settled, but the
654situation is much better than with Perl 5.6. See L<perlos390>,
655L<perlbs2000> (for POSIX-BC), and L<perlvmesa> for more information.
656
657=item *
658
7221edc9 659Building perl with -Duseithreads or -Duse5005threads now works under
660HP-UX 10.20 (previously it only worked under 10.30 or later). You will
661need a thread library package installed. See README.hpux.
6a9b4349 662
663=item *
664
665MacOS Classic (MacPerl has of course been available since
666perl 5.004 but now the source code bases of standard Perl
8b40ef3a 667and MacPerl have been synchronised)
6a9b4349 668
669=item *
670
31d2fa6a 671NCR MP-RAS is now supported.
6a9b4349 672
673=item *
674
31d2fa6a 675NonStop-UX is now supported.
6a9b4349 676
677=item *
678
31d2fa6a 679Amdahl UTS is now supported.
6a9b4349 680
681=item *
682
683z/OS (formerly known as OS/390, formerly known as MVS OE) has now
684support for dynamic loading. This is not selected by default,
685however, you must specify -Dusedl in the arguments of Configure.
686
687=back
688
689=head2 Generic Improvements
690
d468ca04 691=over 4
692
693=item *
694
695Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
6a9b4349 696when building the Perl binary. The only exception to this is SunOS 4.x,
d468ca04 697which needs them.
698
6a9b4349 699=item *
700
8b40ef3a 701Some new Configure symbols, useful for extension writers:
702
703=over 8
704
705=item d_cmsghdr
706
707For struct cmsghdr.
708
709=item d_fcntl_can_lock
710
711Whether fcntl() can be used for file locking.
712
713=item d_fsync
714
715=item d_getitimer
716
717=item d_getpagsz
718
719For getpagesize(), though you should prefer POSIX::sysconf(_SC_PAGE_SIZE))
720
721=item d_msghdr_s
722
723For struct msghdr.
724
725=item need_va_copy
726
727Whether one needs to use Perl_va_copy() to copy varargs.
728
729=item d_readv
730
731=item d_recvmsg
732
733=item d_sendmsg
734
735=item sig_size
736
737The number of elements in an array needed to hold all the available signals.
738
739=item d_sockatmark
740
741=item d_strtoq
742
743=item d_u32align
744
745Whether one needs to access character data aligned by U32 sized pointers.
746
747=item d_ualarm
748
749=item d_usleep
750
751=back
6a9b4349 752
753=item *
754
755Removed Configure symbols: the PDP-11 memory model settings: huge,
756large, medium, models.
757
758=item *
759
760SOCKS support is now much more robust.
761
762=item *
763
764If your file system supports symbolic links you can build Perl outside
765of the source directory by
3b131e01 766
6a9b4349 767 mkdir /tmp/perl/build/directory
768 cd /tmp/perl/build/directory
769 sh /path/to/perl/source/Configure -Dmksymlinks ...
770
771This will create in /tmp/perl/build/directory a tree of symbolic links
772pointing to files in /path/to/perl/source. The original files are left
773unaffected. After Configure has finished you can just say
774
775 make all test
776
777and Perl will be built and tested, all in /tmp/perl/build/directory.
778
d468ca04 779=back
780
781=head1 Selected Bug Fixes
782
7221edc9 783Numerous memory leaks and uninitialized memory accesses have been hunted down.
31d2fa6a 784Most importantly anonymous subs used to leak quite a bit.
6a9b4349 785
d468ca04 786=over 4
787
788=item *
789
7221edc9 790chop(@list) in list context returned the characters chopped in
791reverse order. This has been reversed to be in the right order.
31d2fa6a 792
793=item *
794
3a2c142b 795The order of DESTROYs has been made more predictable.
6a9b4349 796
797=item *
798
799mkdir() now ignores trailing slashes in the directory name,
800as mandated by POSIX.
801
802=item *
803
66917b5b 804Attributes (like :shared) didn't work with our().
805
806=item *
807
808The PERL5OPT environment variable (for passing command line arguments
809to Perl) didn't work for more than a single group of options.
6a9b4349 810
811=item *
812
31d2fa6a 813The tainting behaviour of sprintf() has been rationalized. It does
814not taint the result of floating point formats anymore, making the
815behaviour consistent with that of string interpolation.
816
817=item *
818
6a9b4349 819All but the first argument of the IO syswrite() method are now optional.
820
821=item *
822
823Tie::ARRAY SPLICE method was broken.
824
825=item *
826
d468ca04 827vec() now tries to work with characters <= 255 when possible, but it leaves
828higher character values in place. In that case, if vec() was used to modify
829the string, it is no longer considered to be utf8-encoded.
830
831=back
832
6a9b4349 833=head2 Platform Specific Changes and Fixes
65db4721 834
835=over 4
836
837=item *
838
6a9b4349 839Linux previously had problems related to sockaddrlen when using
840accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
65db4721 841
842=item *
843
66917b5b 844Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
65db4721 845
31d2fa6a 846=item *
847
848Windows
849
850=over 8
851
852=item *
853
854Borland C++ v5.5 is now a supported compiler that can build Perl.
855However, the generated binaries continue to be incompatible with those
856generated by the other supported compilers (GCC and Visual C++).
857
858=item *
859
860Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
861Other bugs in chdir() and Cwd::cwd() have also been fixed.
862
863=item *
864
865Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
866
867=item *
868
7221edc9 869HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
870
871=item *
872
31d2fa6a 873The makefiles now provide a single switch to bulk-enable all the features
874enabled in ActiveState ActivePerl (a popular binary distribution).
875
876=back
877
6a9b4349 878=back
65db4721 879
6a9b4349 880=head1 New or Changed Diagnostics
65db4721 881
6a9b4349 882Two new debugging options have been added: if you have compiled your
883Perl with debugging, you can use the -DT and -DR options to trace
8b40ef3a 884tokenising and to add reference counts to displaying variables,
6a9b4349 885respectively.
65db4721 886
6a9b4349 887=over 4
65db4721 888
889=item *
890
7221edc9 891If an attempt to use a (non-blessed) reference as an array index
6a9b4349 892is made, a warning is given.
65db4721 893
6a9b4349 894=item *
895
896C<push @a;> and C<unshift @a;> (with no values to push or unshift)
897now give a warning. This may be a problem for generated and evaled
898code.
65db4721 899
900=back
901
6a9b4349 902=head1 Changed Internals
65db4721 903
904=over 4
905
906=item *
907
66917b5b 908Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv().
909For the full list of the available APIs see L<perlapi>.
65db4721 910
911=item *
912
66917b5b 913dTHR and djSP have been obsoleted; the former removed (because it's
914a no-op) and the latter replaced with dSP.
6a9b4349 915
916=item *
917
3a2c142b 918Perl now uses system malloc instead of Perl malloc on all 64-bit
31d2fa6a 919platforms, and even in some not-always-64-bit platforms like AIX,
920IRIX, and Solaris. This change breaks backward compatibility but
921Perl's malloc has problems with large address spaces and also the
922speed of vendors' malloc is generally better in large address space
923machines (Perl's malloc is mostly tuned for space).
65db4721 924
925=back
926
b1085720 927=head1 New Tests
928
929Many new tests have been added. The most notable is probably the
930lib/1_compile: it is very notable because running it takes quite a
931long time -- it test compiles all the Perl modules in the distribution.
932Please be patient.
933
d468ca04 934=head1 Known Problems
935
7221edc9 936Note that unlike other sections in this document (which describe
937changes since 5.7.0) this section is cumulative containing known
938problems for all the 5.7 releases.
31d2fa6a 939
7221edc9 940=head2 AIX vac 5.0.0.0 May Produce Buggy Code For Perl
6a9b4349 941
7221edc9 942The AIX C compiler vac version 5.0.0.0 may produce buggy code,
943resulting in few random tests failing, but when the failing tests
944are run by hand, they succeed. We suggest upgrading to at least
945vac version 5.0.1.0, that has been known to compile Perl correctly.
946"lslpp -L|grep vac.C" will tell you the vac version.
6a9b4349 947
7221edc9 948=head2 lib/ftmp-security tests warn 'system possibly insecure'
6a9b4349 949
7221edc9 950Don't panic. Read INSTALL 'make test' section instead.
6a9b4349 951
7221edc9 952=head2 lib/io_multihomed Fails In LP64-Configured HP-UX
6a9b4349 953
7221edc9 954The lib/io_multihomed test may hang in HP-UX if Perl has been
955configured to be 64-bit. Because other 64-bit platforms do not hang in
956this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
957test attempts to create and connect to "multihomed" sockets (sockets
958which have multiple IP addresses).
6a9b4349 959
7221edc9 960=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
961
962If perl is configured with -Duse64bitall, the successful result of the
963subtest 10 of lib/posix may arrive before the successful result of the
964subtest 9, which confuses the test harness so much that it thinks the
965subtest 9 failed.
966
967=head2 lib/b test 19
968
3a2c142b 969The test fails on various platforms (PA64 and IA64 are known), but the
7221edc9 970exact cause is still being investigated.
971
972=head2 Linux With Sfio Fails op/misc Test 48
973
974No known fix.
6a9b4349 975
976=head2 sigaction test 13 in VMS
977
3a2c142b 978The test is known to fail; whether it's because of VMS of because
979of faulty test is not known.
6a9b4349 980
d468ca04 981=head2 sprintf tests 129 and 130
982
3a2c142b 983The op/sprintf tests 129 and 130 are known to fail on some platforms.
7221edc9 984Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
d468ca04 985The failing platforms do not comply with the ANSI C Standard, line
98619ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
987something else than "1" and "-1" when formatting 0.6 and -0.6 using
988the printf format "%.0f", most often they produce "0" and "-0".)
989
7221edc9 990=head2 Failure of Thread tests
991
992The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
993fundamental problems in the 5.005 threading implementation. These are
994not new failures--Perl 5.005_0x has the same bugs, but didn't have
995these tests. (Note that support for 5.005-style threading remains
996experimental.)
997
998=head2 Localising a Tied Variable Leaks Memory
999
1000 use Tie::Hash;
1001 tie my %tie_hash => 'Tie::StdHash';
1002
1003 ...
1004
1005 local($tie_hash{Foo}) = 1; # leaks
1006
1007Code like the above is known to leak memory every time the local()
1008is executed.
1009
6a9b4349 1010=head2 Self-tying of Arrays and Hashes Is Forbidden
1011
1012Self-tying of arrays and hashes is broken in rather deep and
1013hard-to-fix ways. As a stop-gap measure to avoid people from getting
1014frustrated at the mysterious results (core dumps, most often) it is
1015for now forbidden (you will get a fatal error even from an attempt).
1016
7221edc9 1017=head2 Building Extensions Can Fail Because Of Largefiles
1018
1019Some extensions like mod_perl are known to have issues with
1020`largefiles', a change brought by Perl 5.6.0 in which file offsets
1021default to 64 bits wide, where supported. Modules may fail to compile
1022at all or compile and work incorrectly. Currently there is no good
1023solution for the problem, but Configure now provides appropriate
1024non-largefile ccflags, ldflags, libswanted, and libs in the %Config
1025hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
1026having problems can try configuring themselves without the
1027largefileness. This is admittedly not a clean solution, and the
1028solution may not even work at all. One potential failure is whether
1029one can (or, if one can, whether it's a good idea) link together at
1030all binaries with different ideas about file offsets, all this is
1031platform-dependent.
1032
1033=head2 The Compiler Suite Is Still Experimental
1034
1035The compiler suite is slowly getting better but is nowhere near
1036working order yet.
1037
d468ca04 1038=head1 Reporting Bugs
1039
1040If you find what you think is a bug, you might check the articles
1041recently posted to the comp.lang.perl.misc newsgroup and the perl
1042bug database at http://bugs.perl.org. There may also be
1043information at http://www.perl.com/perl/, the Perl Home Page.
1044
1045If you believe you have an unreported bug, please run the B<perlbug>
1046program included with your release. Be sure to trim your bug down
1047to a tiny but sufficient test case. Your bug report, along with the
1048output of C<perl -V>, will be sent off to perlbug@perl.org to be
8b40ef3a 1049analysed by the Perl porting team.
d468ca04 1050
1051=head1 SEE ALSO
1052
1053The F<Changes> file for exhaustive details on what changed.
1054
1055The F<INSTALL> file for how to build Perl.
1056
1057The F<README> file for general stuff.
1058
1059The F<Artistic> and F<Copying> files for copyright information.
1060
1061=head1 HISTORY
1062
1063Written by Jarkko Hietaniemi <F<jhi@iki.fi>>, with many contributions
1064from The Perl Porters and Perl Users submitting feedback and patches.
1065
1066Send omissions or corrections to <F<perlbug@perl.org>>.
1067
1068=cut