.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERL591DELTA 1" .TH PERL591DELTA 1 "2011-09-26" "perl v5.14.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" perl591delta \- what is new for perl v5.9.1 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes differences between the 5.9.0 and the 5.9.1 development releases. See perl590delta for the differences between 5.8.0 and 5.9.0. .SH "Incompatible Changes" .IX Header "Incompatible Changes" .SS "\fIsubstr()\fP lvalues are no longer fixed-length" .IX Subsection "substr() lvalues are no longer fixed-length" The lvalues returned by the three argument form of \fIsubstr()\fR used to be a \&\*(L"fixed length window\*(R" on the original string. In some cases this could cause surprising action at distance or other undefined behaviour. Now the length of the window adjusts itself to the length of the string assigned to it. .ie n .SS "The "":unique"" attribute is only meaningful for globals" .el .SS "The \f(CW:unique\fP attribute is only meaningful for globals" .IX Subsection "The :unique attribute is only meaningful for globals" Now applying \f(CW\*(C`:unique\*(C'\fR to lexical variables and to subroutines will result in a compilation error. .SH "Core Enhancements" .IX Header "Core Enhancements" .ie n .SS "Lexical $_" .el .SS "Lexical \f(CW$_\fP" .IX Subsection "Lexical $_" The default variable \f(CW$_\fR can now be lexicalized, by declaring it like any other lexical variable, with a simple .PP .Vb 1 \& my $_; .Ve .PP The operations that default on \f(CW$_\fR will use the lexically-scoped version of \f(CW$_\fR when it exists, instead of the global \f(CW$_\fR. .PP In a \f(CW\*(C`map\*(C'\fR or a \f(CW\*(C`grep\*(C'\fR block, if \f(CW$_\fR was previously my'ed, then the \&\f(CW$_\fR inside the block is lexical as well (and scoped to the block). .PP In a scope where \f(CW$_\fR has been lexicalized, you can still have access to the global version of \f(CW$_\fR by using \f(CW$::_\fR, or, more simply, by overriding the lexical declaration with \f(CW\*(C`our $_\*(C'\fR. .SS "Tied hashes in scalar context" .IX Subsection "Tied hashes in scalar context" As of perl 5.8.2/5.9.0, tied hashes did not return anything useful in scalar context, for example when used as boolean tests: .PP .Vb 1 \& if (%tied_hash) { ... } .Ve .PP The old nonsensical behaviour was always to return false, regardless of whether the hash is empty or has elements. .PP There is now an interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context, via the \s-1SCALAR\s0 method (see perltie). Without a \s-1SCALAR\s0 method, perl will try to guess whether the hash is empty, by testing if it's inside an iteration (in this case it can't be empty) or by calling \s-1FIRSTKEY\s0. .SS "Formats" .IX Subsection "Formats" Formats were improved in several ways. A new field, \f(CW\*(C`^*\*(C'\fR, can be used for variable-width, one-line-at-a-time text. Null characters are now handled correctly in picture lines. Using \f(CW\*(C`@#\*(C'\fR and \f(CW\*(C`~~\*(C'\fR together will now produce a compile-time error, as those format fields are incompatible. perlform has been improved, and miscellaneous bugs fixed. .SS "Stacked filetest operators" .IX Subsection "Stacked filetest operators" As a new form of syntactic sugar, it's now possible to stack up filetest operators. You can now write \f(CW\*(C`\-f \-w \-x $file\*(C'\fR in a row to mean \&\f(CW\*(C`\-x $file && \-w _ && \-f _\*(C'\fR. See \*(L"\-X\*(R" in perlfunc. .SH "Modules and Pragmata" .IX Header "Modules and Pragmata" .IP "Benchmark" 4 .IX Item "Benchmark" In \f(CW\*(C`Benchmark\*(C'\fR, \fIcmpthese()\fR and \fItimestr()\fR now use the time statistics of children instead of parent when the selected style is 'nop'. .IP "Carp" 4 .IX Item "Carp" The error messages produced by \f(CW\*(C`Carp\*(C'\fR now include spaces between the arguments in function argument lists: this makes long error messages appear more nicely in browsers and other tools. .IP "Exporter" 4 .IX Item "Exporter" \&\f(CW\*(C`Exporter\*(C'\fR will now recognize grouping tags (such as \f(CW\*(C`:name\*(C'\fR) anywhere in the import list, not only at the beginning. .IP "FindBin" 4 .IX Item "FindBin" A function \f(CW\*(C`again\*(C'\fR is provided to resolve problems where modules in different directories wish to use FindBin. .IP "List::Util" 4 .IX Item "List::Util" You can now weaken references to read only values. .IP "threads::shared" 4 .IX Item "threads::shared" \&\f(CW\*(C`cond_wait\*(C'\fR has a new two argument form. \f(CW\*(C`cond_timedwait\*(C'\fR has been added. .SH "Utility Changes" .IX Header "Utility Changes" \&\f(CW\*(C`find2perl\*(C'\fR now assumes \f(CW\*(C`\-print\*(C'\fR as a default action. Previously, it needed to be specified explicitly. .PP A new utility, \f(CW\*(C`prove\*(C'\fR, makes it easy to run an individual regression test at the command line. \f(CW\*(C`prove\*(C'\fR is part of Test::Harness, which users of earlier Perl versions can install from \s-1CPAN\s0. .PP The perl debugger now supports a \f(CW\*(C`save\*(C'\fR command, to save the current history to a file, and an \f(CW\*(C`i\*(C'\fR command, which prints the inheritance tree of its argument (if the \f(CW\*(C`Class::ISA\*(C'\fR module is installed.) .SH "Documentation" .IX Header "Documentation" The documentation has been revised in places to produce more standard manpages. .PP The long-existing feature of \f(CW\*(C`/(?{...})/\*(C'\fR regexps setting \f(CW$_\fR and \fIpos()\fR is now documented. .SH "Performance Enhancements" .IX Header "Performance Enhancements" Sorting arrays in place (\f(CW\*(C`@a = sort @a\*(C'\fR) is now optimized to avoid making a temporary copy of the array. .PP The operations involving case mapping on \s-1UTF\-8\s0 strings (\fIuc()\fR, \fIlc()\fR, \&\f(CW\*(C`//i\*(C'\fR, etc.) have been greatly speeded up. .PP Access to elements of lexical arrays via a numeric constant between 0 and 255 is now faster. (This used to be only the case for global arrays.) .SH "Selected Bug Fixes" .IX Header "Selected Bug Fixes" .SS "\s-1UTF\-8\s0 bugs" .IX Subsection "UTF-8 bugs" Using \fIsubstr()\fR on a \s-1UTF\-8\s0 string could cause subsequent accesses on that string to return garbage. This was due to incorrect \s-1UTF\-8\s0 offsets being cached, and is now fixed. .PP \&\fIjoin()\fR could return garbage when the same \fIjoin()\fR statement was used to process 8 bit data having earlier processed \s-1UTF\-8\s0 data, due to the flags on that statement's temporary workspace not being reset correctly. This is now fixed. .PP Using Unicode keys with tied hashes should now work correctly. .PP \&\fIchop()\fR and \fIchomp()\fR used to mangle \s-1UTF\-8\s0 strings. This has been fixed. .PP \&\fIsprintf()\fR used to misbehave when the format string was in \s-1UTF\-8\s0. This is now fixed. .SS "Threading bugs" .IX Subsection "Threading bugs" Hashes with the \f(CW\*(C`:unique\*(C'\fR attribute weren't made read-only in new threads. They are now. .SS "More bugs" .IX Subsection "More bugs" \&\f(CW\*(C`$a .. $b\*(C'\fR will now work as expected when either \f(CW$a\fR or \f(CW$b\fR is \f(CW\*(C`undef\*(C'\fR. .PP Reading $^E now preserves $!. Previously, the C code implementing $^E did not preserve \f(CW\*(C`errno\*(C'\fR, so reading $^E could cause \f(CW\*(C`errno\*(C'\fR and therefore \&\f(CW$!\fR to change unexpectedly. .PP \&\f(CW\*(C`strict\*(C'\fR wasn't in effect in regexp-eval blocks (\f(CW\*(C`/(?{...})/\*(C'\fR). .SH "New or Changed Diagnostics" .IX Header "New or Changed Diagnostics" A new deprecation warning, \fIDeprecated use of \fImy()\fI in false conditional\fR, has been added, to warn against the use of the dubious and deprecated construct .PP .Vb 1 \& my $x if 0; .Ve .PP See perldiag. .PP The fatal error \fI\s-1DESTROY\s0 created new reference to dead object\fR is now documented in perldiag. .PP A new error, \fI\f(CI%ENV\fI is aliased to \f(CI%s\fI\fR, is produced when taint checks are enabled and when \f(CW*ENV\fR has been aliased (and thus doesn't reflect the program's environment anymore.) .SH "Changed Internals" .IX Header "Changed Internals" These news matter to you only if you either write \s-1XS\s0 code or like to know about or hack Perl internals (using Devel::Peek or any of the \&\f(CW\*(C`B::\*(C'\fR modules counts), or like to run Perl with the \f(CW\*(C`\-D\*(C'\fR option. .SS "Reordering of SVt_* constants" .IX Subsection "Reordering of SVt_* constants" The relative ordering of constants that define the various types of \f(CW\*(C`SV\*(C'\fR have changed; in particular, \f(CW\*(C`SVt_PVGV\*(C'\fR has been moved before \f(CW\*(C`SVt_PVLV\*(C'\fR, \&\f(CW\*(C`SVt_PVAV\*(C'\fR, \f(CW\*(C`SVt_PVHV\*(C'\fR and \f(CW\*(C`SVt_PVCV\*(C'\fR. This is unlikely to make any difference unless you have code that explicitly makes assumptions about that ordering. (The inheritance hierarchy of \f(CW\*(C`B::*\*(C'\fR objects has been changed to reflect this.) .SS "Removal of \s-1CPP\s0 symbols" .IX Subsection "Removal of CPP symbols" The C preprocessor symbols \f(CW\*(C`PERL_PM_APIVERSION\*(C'\fR and \&\f(CW\*(C`PERL_XS_APIVERSION\*(C'\fR, which were supposed to give the version number of the oldest perl binary-compatible (resp. source-compatible) with the present one, were not used, and sometimes had misleading values. They have been removed. .SS "Less space is used by ops" .IX Subsection "Less space is used by ops" The \f(CW\*(C`BASEOP\*(C'\fR structure now uses less space. The \f(CW\*(C`op_seq\*(C'\fR field has been removed and replaced by two one-bit fields, \f(CW\*(C`op_opt\*(C'\fR and \f(CW\*(C`op_static\*(C'\fR. \&\f(CW\*(C`opt_type\*(C'\fR is now 9 bits long. (Consequently, the \f(CW\*(C`B::OP\*(C'\fR class doesn't provide an \f(CW\*(C`seq\*(C'\fR method anymore.) .SS "New parser" .IX Subsection "New parser" perl's parser is now generated by bison (it used to be generated by byacc.) As a result, it seems to be a bit more robust. .SH "Configuration and Building" .IX Header "Configuration and Building" \&\f(CW\*(C`Configure\*(C'\fR now invokes callbacks regardless of the value of the variable they are called for. Previously callbacks were only invoked in the \&\f(CW\*(C`case $variable $define)\*(C'\fR branch. This change should only affect platform maintainers writing configuration hints files. .PP The portability and cleanliness of the Win32 makefiles has been improved. .SH "Known Problems" .IX Header "Known Problems" There are still a couple of problems in the implementation of the lexical \&\f(CW$_\fR: it doesn't work inside \f(CW\*(C`/(?{...})/\*(C'\fR blocks and with regard to the \&\fIreverse()\fR built-in used without arguments. (See the \s-1TODO\s0 tests in \&\fIt/op/mydef.t\fR.) .SS "Platform Specific Problems" .IX Subsection "Platform Specific Problems" The test \fIext/IPC/SysV/t/ipcsysv.t\fR may fail on OpenBSD. This hasn't been diagnosed yet. .PP On some configurations on \s-1AIX\s0 5, one test in \fIlib/Time/Local.t\fR fails. When configured with long doubles, perl may fail tests 224\-236 in \&\fIt/op/pow.t\fR on the same platform. .PP For threaded builds, \fIext/threads/shared/t/wait.t\fR has been reported to fail some tests on HP-UX 10.20. .SH "To-do for perl 5.10.0" .IX Header "To-do for perl 5.10.0" This is a non-exhaustive, non-ordered, non-contractual and non-definitive list of things to do (or nice to have) for perl 5.10.0 : .PP Clean up and finish support for assertions. See assertions. .PP Reimplement the mechanism of lexical pragmas to be more extensible. Fix current pragmas that don't work well (or at all) with lexical scopes or in run-time eval(\s-1STRING\s0) (\f(CW\*(C`sort\*(C'\fR, \f(CW\*(C`re\*(C'\fR, \f(CW\*(C`encoding\*(C'\fR for example). \s-1MJD\s0 has a preliminary patch that implements this. .PP Fix (or rewrite) the implementation of the \f(CW\*(C`/(?{...})/\*(C'\fR closures. .PP Conversions from byte strings to \s-1UTF\-8\s0 currently map high bit characters to Unicode without translation (or, depending on how you look at it, by implicitly assuming that the byte strings are in Latin\-1). As perl assumes the C locale by default, upgrading a string to \s-1UTF\-8\s0 may change the meaning of its contents regarding character classes, case mapping, etc. This should probably emit a warning (at least). .PP Introduce a new special block, \s-1UNITCHECK\s0, which is run at the end of a compilation unit (module, file, eval(\s-1STRING\s0) block). This will correspond to the Perl 6 \s-1CHECK\s0. Perl 5's \s-1CHECK\s0 cannot be changed or removed because the O.pm/B.pm backend framework depends on it. .PP Study the possibility of adding a new prototype character, \f(CW\*(C`_\*(C'\fR, meaning \&\*(L"this argument defaults to \f(CW$_\fR\*(R". .PP Make the peephole optimizer optional. .PP Allow lexical aliases (maybe via the syntax \f(CW\*(C`my \e$alias = \e$foo\*(C'\fR. .PP Fix the bugs revealed by running the test suite with the \f(CW\*(C`\-t\*(C'\fR switch (via \&\f(CW\*(C`make test.taintwarn\*(C'\fR). .PP Make threads more robust. .PP Make \f(CW\*(C`no 6\*(C'\fR and \f(CW\*(C`no v6\*(C'\fR work (opposite of \f(CW\*(C`use 5.005\*(C'\fR, etc.). .PP A test suite for the B module would be nice. .PP A ponie. .SH "Reporting Bugs" .IX Header "Reporting Bugs" If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://bugs.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page. .PP If you believe you have an unreported bug, please run the \fBperlbug\fR program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. .SH "SEE ALSO" .IX Header "SEE ALSO" The \fIChanges\fR file for exhaustive details on what changed. .PP The \fI\s-1INSTALL\s0\fR file for how to build Perl. .PP The \fI\s-1README\s0\fR file for general stuff. .PP The \fIArtistic\fR and \fICopying\fR files for copyright information.