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