NAME
perldelta - what is new for perl v5.8.8
DESCRIPTION
This document describes differences between the 5.8.7 release and the 5.8.8 release.
Incompatible Changes
There are no changes intentionally incompatible with 5.8.7. If any exist, they are bugs and reports are welcome.
Core Enhancements
Modules and Pragmata
Attribute::Handlers upgraded to version 0.78_02
documentation typo fix
attrs upgraded to version 1.02
internal cleanup only
autouse upgraded to version 1.05
simplified implementation
B upgraded to version 1.09_01
The inheritance hierarchy of the
B::
modules has been corrected;B::NV
now inherits fromB::SV
(instead ofB::IV
).
blib upgraded to version 1.03
documentation typo fix
ByteLoader upgraded to version 0.06
internal cleanup
CGI upgraded to version 3.15
Extraneous "?" from self_url() removed
scrolling_list() select attribute fixed
virtual_port now works properly with https protocol
upload_hook() and append() now works in function-oriented mode
POST_MAX doesn't cause client to hang any more
automatic tab indexes are now disabled and new
-tabindex
pragma has been added to turn automatic indexes back onend_form() doesn't emit empty (and non-validating) <div>
CGI::Carp works better in certain mod_perl configurations
Setting $CGI::TMPDIRECTORY is now effective
enhanced documentation
charnames upgraded to version 1.05
viacode() now accept hex strings and is better optimized.
CPAN upgraded to version 1.83
Support for
Module::Build
Support for
bzip2
Support for Module::Signature
Support for
SHA256
Support for
curl
Support for
sudo
new pragma
notest
New commands
recent
andperldoc
New feature <show_upload_date>
CPAN::Version
(improved support for multi-dot version notation)Improved config variable handling
Improved
wget
support on Win32
Cwd upgraded to version 3.12
canonpath() on Win32 now collapses foo\.. sections correctly.
Improved behaviour on Symbian OS.
enhanced documentation and typo fixes
internal cleanup
Data::Dumper upgraded to version 2.121_08
problem where Data::Dumper would sometimes update the iterator state of hashes has been fixed
numeric labels now work
internal cleanup
DB upgraded to version 1.01
problem where regex state would sometimes get clobbered when running under the debugger has been fixed
DB_File upgraded to version 1.814
adds support for Berkeley DB 4.4.
Devel::DProf upgraded to version 20050603.00
internal cleanup
Devel::Peek upgraded to version 1.03
internal cleanup
Devel::PPPort upgraded to version 3.06_01
--compat-version
argument checking has been improvedfiles passed on the command line are filtered by default
--nofilter
option to override the filtering has been addedenhanced documentation
diagnostics upgraded to version 1.15
documentation typo fix
Digest upgraded to version 1.14
constructor now knows which module implement SHA-224
documentation tweaks and typo fixes
Digest::MD5 upgraded to version 2.36
XSLoader is now used for faster loading
enhanced documentation including MD5 weaknesses discovered lately
Dumpvalue upgraded to version 1.12
documentation fix
DynaLoader upgraded but unfortunately we're not able to increment its version number :-(
implements
dl_unload_file
on Win32internal cleanup
XSLoader 0.06 incorporated; small optimisation for calling bootstrap_inherit() and documentation enhancements.
Encode upgraded to version 2.12
coderef now acceptable for CHECK!
3 new characters added to the ISO-8859-7 encoding
new encodings
MIME-Header-ISO_2022_JP
addedproblem with partial character and
encoding(utf-8-strict)
fixed.documentation enhancements and typo fixes
English upgraded to version 1.02
the
$COMPILING
variable has been added
ExtUtils::Constant upgraded to version 0.17
improved compatibility with older versions of perl
ExtUtils::MakeMaker upgraded to version 6.30 (was 6.17)
Too much to list here; see http://search.cpan.org/src/MSCHWERN/ExtUtils-MakeMaker-6.30/Changes
File::Basename upgraded to version 2.74, with changes contributed by Schwern.
Documentation clarified and errors corrected.
basename
now strips trailing path separators before processing the name.basename
now returns/
for parameter/
, which makesbasename
consistent with the shell utility of the same name.The suffix is now not stripped if it is identical to the remaining characters in the name, again for consistency with the shell utility.
Some internal code cleanup.
File::Copy upgraded to version 2.09
copy a file onto itself used to fail.
moving a file between file systems now preserves the access and modification time stamps
File::Find upgraded to version 1.10
windows portability fixes
enhanced documentation
File::Glob upgraded to version 1.05
internal cleanup
File::Path upgraded to version 1.08
mkpath now preserves errno when mkdir fails
File::Spec upgraded to version 3.12
File::Spec->rootdir() now returns
\
on Win32, instead of/
$^O
could sometimes become tainted. This has been fixed.canonpath
on Win32 now collapsesfoo/..
(orfoo\..
) sections correctly, rather than doing the "misguided" work it was previously doing. Note thatcanonpath
on Unix still does not collapse these sections, as doing so would be incorrect.Some documentation improvements
Some internal code cleanup
FileCache upgraded to version 1.06
POD formatting error in documentation fixed
Filter::Simple upgraded to version 0.82
FindBin upgraded to version 1.47
now works better with directories where access rights are more restrictive than usual.
GDBM_File upgraded to version 1.08
internal cleanup
Getopt::Long upgraded to version 2.35
prefix_pattern
has now been complemented by a new configuration optionlong_prefix_pattern
that allows the user to specify what prefix patterns should have long option style semantics applied.options can now take multiple values at once (experimental)
various bug fixes
if upgraded to version 0.05
give more meaningful error messages from if.pm when invoked with a condition in list context.
restore backwards compatibility with earlier versions of perl
IO upgraded to version 1.22
enhanced documentation
internal cleanup
IPC::Open2 upgraded to version 1.02
enhanced documentation
IPC::Open3 upgraded to version 1.02
enhanced documentation
List::Util upgraded to version 1.18 (was 1.14)
fix pure-perl version of refaddr to avoid blessing an un-blessed reference
use XSLoader for faster loading
fixed various memory leaks
internal cleanup and portability fixes
Math::Complex upgraded to version 1.35
atan2(0, i) now works, as do all the (computable) complex argument cases
fixes for certain bugs in
make
andemake
support returning the kth root directly
support [2,-3pi/8] in
emake
support 'inf' for
make
/emake
document
make
/emake
more visibly
Math::Trig upgraded to version 1.03
add more great circle routines:
great_circle_waypoint
angreat_circle_destination
MIME::Base64 upgraded to version 3.07
use XSLoader for faster loading
enhanced documentation
internal cleanup
NDBM_File upgraded to version 1.06
enhanced documentation
ODBM_File upgraded to version 1.06
documentation typo fixed
internal cleanup
Opcode upgraded to version 1.06
enhanced documentation
internal cleanup
open upgraded to version 1.05
enhanced documentation
overload upgraded to version 1.04
enhanced documentation
PerlIO upgraded to version 1.04
PerlIO::via iterate over layers properly now
PerlIO::scalar understands
$/ = ""
nowencoding(utf-8-strict) with partial characters now work
enhanced documentation
internal cleanup
Pod::Functions upgraded to version 1.03
documentation typos fixed
Pod::Html upgraded to version 1.0504
HTML output will now correctly link to
=item
s on the same page, and should be valid XHTML.Variable names are recognized as intended
documentation typos fixed
Pod::Parser upgraded to version 1.32
allow files that start with =head on the first line
windows portability fix
exit status of pod2usage fixed
New
-noperldoc
switch to pod2usagearbitrary URL schemes now allowed
documentation typos fixed
POSIX upgraded to version 1.09
documentation typos fixed
internal cleanup
re upgraded to version 0.05
documentation typo fixed
Safe upgraded to version 2.12
minor documentation enhancement
SDBM_File upgraded to version 1.05
documentation typo fixed
internal cleanup
Socket upgraded to version 1.78
internal cleanup
Storable upgraded to version 2.15
This includes
STORABLE_attach
hook functionality added by Adam Kennedy, and more memory frugal storing under ithreads, by utilising the ithreads cloning tracking code.
Switch upgraded to version 2.10_01
documentation typos fixed
Sys::Syslog upgraded to version 0.13
Now provides numeric macros and meaningful
Exporter
tags.No longer uses
Sys::Hostname
as it may provide useless values in unconfigured network environments, so instead directly usesINADDR_LOOPBACK
.syslog()
now uses local timestamp.setlogmask()
now behaves like its C counterpart.setlogsock()
will nowcroak()
as documented.Improved error and warnings messages.
Improved documentation.
Term::ANSIColor upgraded to version 1.10
Fixes a bug in
colored
when$EACHLINE
is set that caused it to not color lines consisting solely of 0.Improved tests.
Term::ReadLine upgraded to version 1.02
documentation tweaks
Test::Harness upgraded to version 2.56 (was 2.48)
The Test::Harness timer is now off by default.
Now shows elapsed time in milliseconds.
various bug fixes
Test::Simple upgraded to version 0.62 (was 0.54)
is_deeply() failed to work for many cases
various minor bug fixes
documentation enhancements
Text::Tabs upgraded to version 2005.0824
Provides a faster implementation of
expand
Text::Wrap upgraded to version 2005.082401
Adds
$Text::Wrap::separator2
, which allows you to preserve existing newlines but add line-breaks with some other string.
threads upgraded to version 1.07
threads will now honour
no warnings 'threads'
A thread's interpreter is now freed after
$t-
join()> rather than afterundef $t
, which should fix some ithreads memory leaks. (Fixed by Dave Mitchell)Some documentation typo fixes.
threads::shared upgraded to version 0.94
documentation changes only
Note: An improved implementation of
threads::shared
is available on CPAN - this will be merged into 5.8.9 if it proves stable.
Tie::Hash upgraded to version 1.02
documentation typo fixed
Time::HiRes upgraded to version 1.86 (was 1.66)
clock_nanosleep() and clock() functions added
support for the POSIX clock_gettime() and clock_getres() has been added
return undef or an empty if the C gettimeofday() fails
improved nanosleep detection
internal cleanup
enhanced documentation
Unicode::Collate upgraded to version 0.52
Now implements UCA Revision 14 (based on Unicode 4.1.0).
Unicode::Collate->new method no longer destroys user's $_
enhanced documentation
Unicode::UCD upgraded to version 0.24
documentation typos fixed
User::grent upgraded to version 1.01
documentation typo fixed
utf8 upgraded to version 1.06
documentation typos fixed
vmsish upgraded to version 1.02
documentation typos fixed
warnings upgraded to version 1.05
gentler messing with Carp:: internals
internal cleanup
documentation update
Win32 upgraded to version 0.2601
provides Windows Vista support to
Win32::GetOSName
documentation enhancements
XS::Typemap upgraded to version 0.02
internal cleanup
Utility Changes
h2xs enhancements
h2xs
implements new option --use-xsloader
to force use of XSLoader
even in backward compatible modules.
The handling of authors' names that had apostrophes has been fixed.
Any enums with negative values are now skipped.
perlivp enhancements
perlivp
implement new option -a
and will not check for *.ph files by default any more. Use the -a
option to run all tests.
New Documentation
The perlglossary manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O'Reilly Media, inc.
Performance Enhancements
The default since perl 5.000 has been for perl to create an empty scalar with every new typeglob. The increased use of lexical variables means that most are now unused. Thanks to Nicholas Clark's efforts, Perl can now be compiled with
-DPERL_DONT_CREATE_GVSV
to avoid creating these empty scalars. This will significantly decrease the number of scalars allocated for all configurations, and the number of scalars that need to be copied for ithread creation. Whilst this option is binary compatible with existing perl installations, it does change a long-standing previous assumption about the internals, hence it is not enabled by default, as some third party code may rely on the old behaviour.We would recommend testing with this configuration on new deployments of perl, particularly for multi-threaded servers, to see whether all third party code is compatible with it, as this configuration may give useful performance improvements. For existing installations we would not recommend changing to this configuration unless thorough testing is performed before deployment.
chdir
,chmod
andchown
can now work on filehandles as well as filenames, if the system supports respectivelyfchdir
,fchmod
andfchown
, thanks to a patch provided by Gisle Aas.Weak reference creation is now O(1) rather than O(n), courtesy of Nicholas Clark. Weak reference deletion remains O(n), but if deletion only happens at program exit, it may be skipped completely.
Salvador Fandiño provided improvements to reduce the memory usage of
sort
and to speed up some cases.Jarkko Hietaniemi and Andy Lester worked to mark as much data as possible in the C source files as
static
, to increase the proportion of the executable file that the operating system can share between process, and thus reduce real memory usage on multi-user systems.
Installation and Configuration Improvements
Parallel makes should work properly now, although there may still be problems with if make test
is instructed to run in parallel.
Building with Borland's compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.
Configure
will now detect clearenv
and unsetenv
, thanks to a patch from Alan Burlison. It will also probe for futimes
and whether sprintf
correctly returns the length of the formatted string, which will both be used in perl 5.8.9.
There are improved hints for next-3.0, vmesa, IX, Darwin, Solaris, Linux, DEC/OSF, HP-UX and MPE/iX
Perl extensions on Windows now can be statically built into the Perl DLL, thanks to a work by Vadim Konovalov. (This improvement was actually in 5.8.7, but was accidentally omitted from perl587delta)
Selected Bug Fixes
Remove over-optimisation
Perl 5.8.4 introduced a change so that assignments of undef
to a scalar, or of an empty list to an array or a hash, were optimised out. As this could cause problems when goto
jumps were involved, this change was backed out.
sprintf() fixes
Using the sprintf() function with some formats could lead to a buffer overflow in some specific cases. This has been fixed, along with several other bugs, notably in bounds checking.
In related fixes, it was possible for badly written code that did not follow the documentation of Sys::Syslog
to have formatting vulnerabilities. Sys::Syslog
has been changed to protect people from poor quality third party code.
Debugger and Unicode slowdown
It had been reported that running under perl's debugger when processing Unicode data could cause unexpectedly large slowdowns. The most likely cause of this was identified and fixed by Nicholas Clark.
Smaller fixes
FindBin
now works better with directories where access rights are more restrictive than usual.Several memory leaks in ithreads were closed. An improved implementation of
threads::shared
is available on CPAN - this will be merged into 5.8.9 if it proves stable.Trailing spaces are now trimmed from
$!
and$^E
.Operations that require perl to read a process' list of groups, such as reads of
$(
and$)
, now dynamically allocate memory rather than using a fixed sized array. The fixed size array could cause C stack exhaustion on systems configured to use large numbers of groups.PerlIO::scalar
now works better with non-default$/
settings.You can now use the
x
operator to repeat aqw//
list. This used to raise a syntax error.The debugger now traces correctly execution in eval("")uated code that contains #line directives.
The value of the
open
pragma is no longer ignored for three-argument opens.The optimisation of
for (reverse @a)
introduced in perl 5.8.6 could misbehave when the array had undefined elements and was used in LVALUE context. Dave Mitchell provided a fix.Some case insensitive matches between UTF-8 encoded data and 8 bit regexps, and vice versa, could give malformed character warnings. These have been fixed by Dave Mitchell and Yves Orton.
lcfirst
anducfirst
could corrupt the string for certain cases where the length UTF-8 encoding of the string in lower case, upper case or title case differed. This was fixed by Nicholas Clark.Perl will now use the C library calls
unsetenv
andclearenv
if present to delete keys from%ENV
and delete%ENV
entirely, thanks to a patch from Alan Burlison.
New or Changed Diagnostics
Attempt to set length of freed array
This is a new warning, produced in situations such as this:
$r = do {my @a; \$#a};
$$r = 503;
Non-string passed as bitmask
This is a new warning, produced when number has been passed as a argument to select(), instead of a bitmask.
# Wrong, will now warn
$rin = fileno(STDIN);
($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
# Should be
$rin = '';
vec($rin,fileno(STDIN),1) = 1;
($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
Search pattern not terminated or ternary operator parsed as search pattern
This syntax error indicates that the lexer couldn't find the final delimiter of a ?PATTERN?
construct. Mentioning the ternary operator in this error message makes syntax diagnostic easier.
Changed Internals
There has been a fair amount of refactoring of the C
source code, partly to make it tidier and more maintainable. The resulting object code and the perl
binary may well be smaller than 5.8.7, in particular due to a change contributed by Dave Mitchell which reworked the warnings code to be significantly smaller. Apart from being smaller and possibly faster, there should be no user-detectable changes.
Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared const
to the C compiler. Steve Peters provided new *_set macros and reworked the core to use these rather than assigning to macros in LVALUE context.
Dave Mitchell improved the lexer debugging output under -DT
Nicholas Clark changed the string buffer allocation so that it is now rounded up to the next multiple of 4 (or 8 on platforms with 64 bit pointers). This should reduce the number of calls to realloc
without actually using any extra memory.
The HV
's array of HE*
s is now allocated at the correct (minimal) size, thanks to another change by Nicholas Clark. Compile with -DPERL_USE_LARGE_HV_ALLOC
to use the old, sloppier, default.
For XS or embedding debugging purposes, if perl is compiled with -DDEBUG_LEAKING_SCALARS_FORK_DUMP
in addition to -DDEBUG_LEAKING_SCALARS
then a child process is fork
ed just before global destruction, which is used to display the values of any scalars found to have leaked at the end of global destruction. Without this, the scalars have already been freed sufficiently at the point of detection that it is impossible to produce any meaningful dump of their contents. This feature was implemented by the indefatigable Nicholas Clark, based on an idea by Mike Giroux.
New Tests
Known Problems
Platform Specific Problems
The optimiser on HP-UX 11.23 (Itanium 2) is currently partly disabled (scaled down to +O1) when using HP C-ANSI-C; the cause of problems at higher optimisation levels is still unclear.
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.
If you believe you have an unreported bug, please run the perlbug 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 perl -V
, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. You can browse and search the Perl 5 bugs at http://bugs.perl.org/
SEE ALSO
The Changes file for exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 1445:
Non-ASCII character seen before =encoding in 'Fandiño'. Assuming CP1252