-M=head1 NAME
+=head1 NAME
perldelta - what is new for perl v5.8.0
# later, in some package using or inheriting from MyPack...
my MyPack $Fluffy : Wolf; # the attribute handler Wolf will be called
-
+
Both variables and routines can have attribute handlers. Handlers can
be specific to type (SCALAR, ARRAY, HASH, or CODE), or specific to the
exact compilation phase (BEGIN, CHECK, INIT, or END).
=item *
C<Tie::RefHash::Nestable>, by Edward Avis, allows storing hash
-references (unlike the standard Tie::RefHash) The module is contained
-within Tie::RefHash, see L<Tie::RefHash).
+references (unlike the standard Tie::RefHash) The module is contained
+within Tie::RefHash, see L<Tie::RefHash>.
=item *
=head1 Selected Bug Fixes
+Numerous memory leaks and uninitialized memory accesses have been hunted down.
+Most importantly anonymous subs used to leak quite a bit.
+
=over 4
=item *
Zero entries were missing from the Unicode classes like C<IsDigit>.
+=item *
+
+chop(@list) in list context returned the characters chopped in
+reverse order. This has been reversed to be in the right order.
+
+=item *
+
+The order of DESTROYs has been made more predictable.
+
+=item *
+
+mkdir() now ignores trailing slashes in the directory name,
+as mandated by POSIX.
+
+=item *
+
+Attributes (like :shared) didn't work with our().
+
+=item *
+
+The PERL5OPT environment variable (for passing command line arguments
+to Perl) didn't work for more than a single group of options.
+
+=item *
+
+The tainting behaviour of sprintf() has been rationalized. It does
+not taint the result of floating point formats anymore, making the
+behaviour consistent with that of string interpolation.
+
+=item *
+
+All but the first argument of the IO syswrite() method are now optional.
+
+=item *
+
+Tie::ARRAY SPLICE method was broken.
+
+=item *
+
+vec() now tries to work with characters <= 255 when possible, but it leaves
+higher character values in place. In that case, if vec() was used to modify
+the string, it is no longer considered to be utf8-encoded.
+
+=item *
+
+The autouse pragma didn't work for Multi::Part::Function::Names.
+
+=item *
+
+The behaviour of non-decimal but numeric string constants such as
+"0x23" was platform-dependent: in some platforms that was seen as 35,
+in some as 0, in some as a floating point number (don't ask). This
+was caused by Perl using the operating system libraries in a situation
+where the result of the string to number conversion is undefined: now
+Perl consistently handles such strings as zero in numeric contexts.
+
+=item *
+
+L<dprofpp> -R didn't work.
+
+=item *
+
+PERL5OPT with embedded spaces didn't work.
+
+=item *
+
+L<Sys::Syslog> ignored the C<LOG_AUTH> constant.
+
+=item *
+
+Some versions of glibc have a broken modfl(). This affects builds
+with C<-Duselongdouble>. This version of Perl detects this brokenness
+and has a workaround for it. The glibc release 2.2.2 is known to have
+fixed the modfl() bug.
+
+=item *
+
+Linux previously had problems related to sockaddrlen when using
+accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
+
+=item *
+
+Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
+
+=item *
+
+Windows
+
+=over 8
+
+=item *
+
+Borland C++ v5.5 is now a supported compiler that can build Perl.
+However, the generated binaries continue to be incompatible with those
+generated by the other supported compilers (GCC and Visual C++).
+
+=item *
+
+Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
+Other bugs in chdir() and Cwd::cwd() have also been fixed.
+
+=item *
+
+Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
+
+=item *
+
+HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
+
+=item *
+
+The makefiles now provide a single switch to bulk-enable all the features
+enabled in ActiveState ActivePerl (a popular Win32 binary distribution).
+
+=back
+
=back
=item *
=head1 New or Changed Diagnostics
+=over 4
+
+=item *
+
All regular expression compilation error messages are now hopefully
easier to understand both because the error message now comes before
the failed regex and because the point of failure is now clearly
-marked.
+marked by a C<E<lt>-- HERE> marker.
+
+=item *
The various "opened only for", "on closed", "never opened" warnings
drop the C<main::> prefix for filehandles in the C<main> package,
for example C<STDIN> instead of <main::STDIN>.
+=item *
+
The "Unrecognized escape" warning has been extended to include C<\8>,
C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters.
-=over 4
+=item *
Two new debugging options have been added: if you have compiled your
Perl with debugging, you can use the -DT and -DR options to trace
now give a warning. This may be a problem for generated and evaled
code.
+=item *
+
+If you try to L<perlfunc/pack> a number less than 0 or larger than 255
+using the C<"C"> format you will get an optional warning. Similarly
+for the C<"c"> format and a number less than -128 or more than 127.
+
+=item *
+
+Certain regex modifiers such as C<(?o)> make sense only if applied to
+the entire regex. You will an optional warning if you try to do otherwise.
+
+=item *
+
+Using arrays or hashes as references (e.g. C<%foo->{bar}> has been
+deprecated for a while. Now you will get an optional warning.
+
=back
=head1 Changed Internals
=item *
+The MAGIC constants (e.g. C<'P'>) have been macrofied
+(e.g. C<PERL_MAGIC_TIED>) for better source code readability
+and maintainability.
+
+=item *
+
+The regex compiler now maintains a structure that identifies nodes in
+the compiled bytecode with the corresponding syntactic features of the
+original regex expression. The information is attached to the new
+C<offsets> member of the C<struct regexp>. See L<perldebguts> for more
+complete information.
+
+=item *
+
+The C code has been made much more C<gcc -Wall> clean. Some warning
+messages still remain in some platforms, so if you are compiling with
+gcc you may see some warnings about dubious practices. The warnings
+are being worked on.
+
+=item *
+
+F<perly.c>, F<sv.c>, and F<sv.h> have now been extensively commented.
+
+=item *
+
Documentation on how to use the Perl source repository has been added
to F<Porting/repository.pod>.
Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also
from all the Perl 5.7 releases), so that particular vulnerability
isn't there anymore. However, further security vulnerabilities are,
-unfortunately, always possible. The suidperl code is being reviewed
-and if deemed too risky to continue to be supported, it may be
-completely removed from future releases. In any case, suidperl should
-only be used by security experts who know exactly what they are doing
-and why they are using suidperl instead of some other solution such as
-sudo (see http://www.courtesan.com/sudo/).
-
-=head1 Selected Bug Fixes
-
-Numerous memory leaks and uninitialized memory accesses have been hunted down.
-Most importantly anonymous subs used to leak quite a bit.
-
-=over 4
-
-=item *
-
-chop(@list) in list context returned the characters chopped in
-reverse order. This has been reversed to be in the right order.
-
-=item *
-
-The order of DESTROYs has been made more predictable.
-
-=item *
-
-mkdir() now ignores trailing slashes in the directory name,
-as mandated by POSIX.
-
-=item *
-
-Attributes (like :shared) didn't work with our().
-
-=item *
-
-The PERL5OPT environment variable (for passing command line arguments
-to Perl) didn't work for more than a single group of options.
-
-=item *
-
-The tainting behaviour of sprintf() has been rationalized. It does
-not taint the result of floating point formats anymore, making the
-behaviour consistent with that of string interpolation.
-
-=item *
-
-All but the first argument of the IO syswrite() method are now optional.
-
-=item *
-
-Tie::ARRAY SPLICE method was broken.
-
-=item *
-
-vec() now tries to work with characters <= 255 when possible, but it leaves
-higher character values in place. In that case, if vec() was used to modify
-the string, it is no longer considered to be utf8-encoded.
-
-=item *
-
-The autouse pragma didn't work for Multi::Part::Function::Names.
-
-=item *
-
-The behaviour of non-decimal but numeric string constants such as
-"0x23" was platform-dependent: in some platforms that was seen as 35,
-in some as 0, in some as a floating point number (don't ask). This
-was caused by Perl using the operating system libraries in a situation
-where the result of the string to number conversion is undefined: now
-Perl consistently handles such strings as zero in numeric contexts.
-
-=item *
-
-L<dprofpp> -R didn't work.
-
-=item *
-
-PERL5OPT with embedded spaces didn't work.
-
-=item *
-
-L<Sys::Syslog> ignored the C<LOG_AUTH> constant.
-
-=item *
-
-Some versions of glibc have a broken modfl(). This affects builds
-with C<-Duselongdouble>. This version of Perl detects this brokenness
-and has a workaround for it. The glibc release 2.2.2 is known to have
-fixed the modfl() bug.
-
-=item *
-
-Linux previously had problems related to sockaddrlen when using
-accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
-
-=item *
-
-Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
-
-=item *
-
-Windows
-
-=over 8
-
-=item *
-
-Borland C++ v5.5 is now a supported compiler that can build Perl.
-However, the generated binaries continue to be incompatible with those
-generated by the other supported compilers (GCC and Visual C++).
-
-=item *
-
-Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
-Other bugs in chdir() and Cwd::cwd() have also been fixed.
-
-=item *
-
-Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
-
-=item *
-
-HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
-
-=item *
-
-The makefiles now provide a single switch to bulk-enable all the features
-enabled in ActiveState ActivePerl (a popular binary distribution).
-
-=back
+unfortunately, always possible. The suidperl functionality is most
+probably going to be removed in Perl 5.10. In any case, suidperl
+should only be used by security experts who know exactly what they are
+doing and why they are using suidperl instead of some other solution
+such as sudo (see http://www.courtesan.com/sudo/).
=head1 New Tests
(This happens because the test scripts from under t/lib have been moved
to be closer to the library/extension they are testing.)
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item *
-
-In the regular expression diagnostics the C<E<lt>E<lt> HERE> marker
-introduced in 5.7.0 has been changed to be C<E<lt>-- HERE> since too
-many people found the C<E<lt>E<lt>> to be too similar to here-document
-starters.
-
-=item *
-
-If you try to L<perlfunc/pack> a number less than 0 or larger than 255
-using the C<"C"> format you will get an optional warning. Similarly
-for the C<"c"> format and a number less than -128 or more than 127.
-
-=item *
-
-Certain regex modifiers such as C<(?o)> make sense only if applied to
-the entire regex. You will an optional warning if you try to do otherwise.
-
-=item *
-
-Using arrays or hashes as references (e.g. C<%foo->{bar}> has been
-deprecated for a while. Now you will get an optional warning.
-
-=back
-
-=head1 Source Code Enhancements
-
-=head2 MAGIC constants
-
-The MAGIC constants (e.g. C<'P'>) have been macrofied
-(e.g. C<PERL_MAGIC_TIED>) for better source code readability
-and maintainability.
-
-=head2 Better commented code
-
-F<perly.c>, F<sv.c>, and F<sv.h> have now been extensively commented.
-
-=head2 Regex pre-/post-compilation items matched up
-
-The regex compiler now maintains a structure that identifies nodes in
-the compiled bytecode with the corresponding syntactic features of the
-original regex expression. The information is attached to the new
-C<offsets> member of the C<struct regexp>. See L<perldebguts> for more
-complete information.
-
-=head2 gcc -Wall
-
-The C code has been made much more C<gcc -Wall> clean. Some warning
-messages still remain, though, so if you are compiling with gcc you
-will see some warnings about dubious practices. The warnings are
-being worked on.
-
=head1 Known Problems
Note that unlike other sections in this document (which describe
Here are the known failures from some compiler/platform combinations.
DEC C V5.3-006 on OpenVMS VAX V6.2
-
+
[-.ext.list.util.t]tainted..............FAILED on test 3
[-.ext.posix]sigaction..................FAILED on test 7
[-.ext.time.hires]hires.................FAILED on test 14