integrate cfgperl contents into mainline
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
index 33ab171..8327a68 100644 (file)
@@ -81,13 +81,15 @@ Using the C<undef> operator on a readonly value (such as $1) has
 the same effect as assigning C<undef> to the readonly value--it
 throws an exception.
 
-=item Close-on-exec bit may be set on pipe() handles
+=item Close-on-exec bit may be set on pipe and socket handles
 
 On systems that support a close-on-exec flag on filehandles, the
-flag will be set for any handles created by pipe(), if that is
-warranted by the value of $^F that may be in effect.  Earlier
-versions neglected to set the flag for handles created with
-pipe().  See L<perlfunc/pipe> and L<perlvar/$^F>.
+flag will be set for any handles created by pipe(), socketpair(),
+socket(), and accept(), if that is warranted by the value of $^F
+that may be in effect.  Earlier versions neglected to set the flag
+for handles created with these operators.  See L<perlfunc/pipe>,
+L<perlfunc/socketpair>, L<perlfunc/socket>, L<perlfunc/accept>,
+and L<perlvar/$^F>.
 
 =item Writing C<"$$1"> to mean C<"${$}1"> is unsupported
 
@@ -322,11 +324,13 @@ by running Configure with C<-Dflag>.
 =head2 -Dusethreads and -Duse64bits now more daring
 
 The Configure options enabling the use of threads and the use of
-64-bitness are now more daring in the sense that they no more have
-an explicit list of operating systems of known threads/64-bit
+64-bitness are now more daring in the sense that they no more have an
+explicit list of operating systems of known threads/64-bit
 capabilities.  In other words: if your operating system has the
-necessary APIs, you should be able just to go ahead and use them.
-See also L<"64-bit support">.
+necessary APIs and datatypes, you should be able just to go ahead and
+use them, for threads by Configure -Dusethreads, and for 64 bits
+either explicitly by Configure -Duse64bits or implicitly if your
+system has 64 bit wide datatypes.  See also L<"64-bit support">.
 
 =head2 Long Doubles
 
@@ -378,8 +382,8 @@ building and installing from source, the defaults should be fine.
 =head2 Unicode and UTF-8 support
 
 Perl can optionally use UTF-8 as its internal representation for character
-strings.  The C<utf8> and C<byte> pragmas are used to control this support
-in the current lexical scope.  See L<perlunicode>, L<utf8> and L<byte> for
+strings.  The C<utf8> and C<bytes> pragmas are used to control this support
+in the current lexical scope.  See L<perlunicode>, L<utf8> and L<bytes> for
 more information.
 
 =head2 Interpreter cloning, threads, and concurrency
@@ -530,10 +534,10 @@ C<oct()>:
 
 Perl now allows the arrow to be omitted in many constructs
 involving subroutine calls through references.  For example,
-C<$foo[10]->('foo')> may now be written C<$foo[10]('foo')>.
+C<$foo[10]-E<gt>('foo')> may now be written C<$foo[10]('foo')>.
 This is rather similar to how the arrow may be omitted from
-C<$foo[10]->{'foo'}>.  Note however, that the arrow is still
-required for C<foo(10)->('bar')>.
+C<$foo[10]-E<gt>{'foo'}>.  Note however, that the arrow is still
+required for C<foo(10)-E<gt>('bar')>.
 
 =head2 exists() is supported on subroutine names
 
@@ -547,15 +551,17 @@ The exists() and delete() builtins now work on simple arrays as well.
 The behavior is similar to that on hash elements.
 
 exists() can be used to check whether an array element has been
-initialized without autovivifying it.  If the array is tied, the
-EXISTS() method in the corresponding tied package will be invoked.
+initialized.  This avoids autovivifying array elements that don't exist.
+If the array is tied, the EXISTS() method in the corresponding tied
+package will be invoked.
 
 delete() may be used to remove an element from the array and return
 it.  The array element at that position returns to its unintialized
 state, so that testing for the same element with exists() will return
 false.  If the element happens to be the one at the end, the size of
-the array also shrinks by one.  If the array is tied, the DELETE() method
-in the corresponding tied package will be invoked.
+the array also shrinks up to the highest element that tests true for
+exists(), or 0 if none such is found.  If the array is tied, the DELETE() 
+method in the corresponding tied package will be invoked.
 
 See L<perlfunc/exists> and L<perlfunc/delete> for examples.
 
@@ -565,7 +571,7 @@ The length argument of C<syswrite()> has become optional.
 
 =head2 File and directory handles can be autovivified
 
-Similar to how constructs such as C<$x->[0]> autovivify a reference,
+Similar to how constructs such as C<$x-E<gt>[0]> autovivify a reference,
 handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(),
 socket(), and accept()) now autovivify a file or directory handle
 if the handle passed to them is an uninitialized scalar variable.  This
@@ -631,8 +637,10 @@ Note that unless you have the case (a) you will have to configure
 and compile Perl using the -Duse64bits Configure flag.
 
 Unfortunately bit arithmetics (&, |, ^, ~, <<, >>) for numbers are not
-64-bit clean, they are explictly forced to be 32-bit.  Bit arithmetics
-for bit vectors (created by vec()) are not limited in their width.
+64-bit clean, they are explictly forced to be 32-bit because of
+tangled backward compatibility issues.  This limitation is subject to
+change.  Bit arithmetics for bit vector scalars (created by vec()) are
+not limited in their width.
 
 Last but not least: note that due to Perl's habit of always using
 floating point numbers the quads are still not true integers.
@@ -960,7 +968,7 @@ array element in that slot.
 =head2 Pseudo-hashes work better
 
 Dereferencing some types of reference values in a pseudo-hash,
-such as C<$ph->{foo}[1]>, was accidentally disallowed.  This has
+such as C<$ph-E<gt>{foo}[1]>, was accidentally disallowed.  This has
 been corrected.
 
 When applied to a pseudo-hash element, exists() now reports whether
@@ -1391,8 +1399,11 @@ large file (more than 4GB) access Note that the O_LARGEFILE is
 automatically/transparently added to sysopen() flags if large file
 support has been configured), Free/Net/OpenBSD locking behaviour flags
 F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of
-O_RDONLY, O_WRONLY, and O_RDWR.  Also SEEK_SET, SEEK_CUR, and SEEK_END
-added for one-stop shopping of the seek/sysseek constants.
+O_RDONLY, O_WRONLY, and O_RDWR.  The seek()/sysseek() constants
+SEEK_SET, SEEK_CUR, and SEEK_END are available via the C<:seek> tag.
+The chmod()/stat() S_IF* constants and S_IS* functions are available
+via the C<:mode> tag.
+
 
 =item File::Compare
 
@@ -1621,6 +1632,11 @@ fixed.
 Sys::Syslog now uses XSUBs to access facilities from syslog.h so it
 no longer requires syslog.ph to exist. 
 
+=item Sys::Hostname
+
+Sys::Hostname now uses XSUBs to call the C library's gethostname() or
+uname() if they exist.
+
 =item Time::Local
 
 The timelocal() and timegm() functions used to silently return bogus
@@ -1892,6 +1908,22 @@ most likely an unexpected right brace '}'.
 malloc()ed in the first place. Mandatory, but can be disabled by
 setting environment variable C<PERL_BADFREE> to 1.
 
+=item Bareword found in conditional
+
+(W) The compiler found a bareword where it expected a conditional,
+which often indicates that an || or && was parsed as part of the
+last argument of the previous construct, for example:
+
+    open FOO || die;
+
+It may also indicate a misspelled constant that has been interpreted
+as a bareword:
+
+    use constant TYPO => 1;
+    if (TYOP) { print "foo" }
+
+The C<strict> pragma is useful in avoiding such errors.
+
 =item Binary number > 0b11111111111111111111111111111111 non-portable
 
 (W) The binary number you specified is larger than 2**32-1
@@ -2351,6 +2383,14 @@ appear in %ENV.  This may be a benign occurrence, as some software packages
 might directly modify logical name tables and introduce nonstandard names,
 or it may indicate that a logical name table has been corrupted.
 
+=item Probable precedence problem on %s
+
+(W) The compiler found a bareword where it expected a conditional,
+which often indicates that an || or && was parsed as part of the
+last argument of the previous construct, for example:
+
+    open FOO || die;
+
 =item regexp too big
 
 (F) The current implementation of regular expressions uses shorts as