X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldelta.pod;h=90c81de852c1491f5835ff083b292c9af89e7c8e;hb=6b49d2665cf5b4cee8758bc654f9290f3855049e;hp=3a2c296c91c32313f2f7fb37cd0fa62d201db9a1;hpb=34d09196f6a006314d7ea49a091a30ce5ee08bff;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 3a2c296..90c81de 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -57,6 +57,45 @@ cases remains unchanged: See L. +=head2 Perl's version numbering has changed + +Beginning with Perl version 5.6, the version number convention has been +changed to a "dotted integer" scheme that is more commonly found in open +source projects. + +Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc. +The next development series following v5.6 will be numbered v5.7.x, +beginning with v5.7.0, and the next major production release following +v5.6 will be v5.8. + +The English module now sets $PERL_VERSION to $^V (a string value) rather +than C<$]> (a numeric value). (This is a potential incompatibility. +Send us a report via perlbug if you are affected by this.) + +The v1.2.3 syntax is also now legal in Perl. +See L for more on that. + +To cope with the new versioning system's use of at least three significant +digits for each version component, the method used for incrementing the +subversion number has also changed slightly. We assume that versions older +than v5.6 have been incrementing the subversion component in multiples of +10. Versions after v5.6.0 will increment them by 1. Thus, using the new +notation, 5.005_03 is the same as v5.5.30, and the first maintenance +version following v5.6.0 will be v5.6.1, which amounts to a floating point +value of 5.006_001). + +=item Literals of the form C<1.2.3> parse differently + +Previously, numeric literals with more than one dot in them were +interpreted as a floating point number concatenated with one or more +numbers. Such "numbers" are now parsed as strings composed of the +specified ordinals. + +For example, C used to output C<97.9899> in earlier +versions, but now prints C. + +See L below. + =item Possibly changed pseudo-random number generator In 5.005_0x and earlier, perl's rand() function used the C library @@ -81,13 +120,15 @@ Using the C operator on a readonly value (such as $1) has the same effect as assigning C 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 and L. +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, +L, L, L, +and L. =item Writing C<"$$1"> to mean C<"${$}1"> is unsupported @@ -284,29 +325,6 @@ create new threads from Perl (i.e., C will not work with interpreter threads). C continues to be available when you ask for -Duse5005threads, bugs and all. -=head2 Perl's version numbering has changed - -Beginning with Perl version 5.6, the version number convention has been -changed to a "dotted tuple" scheme that is more commonly found in open -source projects. - -Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc. -The next development series following v5.6 will be numbered v5.7.x, -beginning with v5.7.0, and the next major production release following -v5.6 will be v5.8. - -The v1.2.3 syntax is also now legal in Perl. See L -for more on that. - -To cope with the new versioning system's use of at least three significant -digits for each version component, the method used for incrementing the -subversion number has also changed slightly. We assume that versions older -than v5.6 have been incrementing the subversion component in multiples of -10. Versions after v5.6 will increment them by 1. Thus, using the new -notation, 5.005_03 is the same as v5.5.30, and the first maintenance -version following v5.6 will be v5.6.1, which amounts to a floating point -value of 5.006_001). - =head2 New Configure flags The following new flags may be enabled on the Configure command line @@ -368,20 +386,28 @@ process starts. Run C to find out the full C<-A> syntax. =head2 Enhanced Installation Directories -The installation structure has been enriched to improve the support for -maintaining multiple versions of perl, to provide locations for -vendor-supplied modules and scripts, and to ease maintenance of -locally-added modules and scripts. See the section on Installation -Directories in the INSTALL file for complete details. For most users -building and installing from source, the defaults should be fine. +The installation structure has been enriched to improve the support +for maintaining multiple versions of perl, to provide locations for +vendor-supplied modules, scripts, and manpages, and to ease maintenance +of locally-added modules, scripts, and manpages. See the section on +Installation Directories in the INSTALL file for complete details. +For most users building and installing from source, the defaults should +be fine. + +If you previously used C or C<-Dsitearch> to set +special values for library directories, you might wish to consider using +the new C<-Dsiteprefix> setting instead. Also, if you wish to re-use a +config.sh file from an earlier version of perl, you should be sure to +check that Configure makes sensible choices for the new directories. +See INSTALL for complete details. =head1 Core Changes =head2 Unicode and UTF-8 support Perl can optionally use UTF-8 as its internal representation for character -strings. The C and C pragmas are used to control this support -in the current lexical scope. See L, L and L for +strings. The C and C pragmas are used to control this support +in the current lexical scope. See L, L and L for more information. =head2 Interpreter cloning, threads, and concurrency @@ -453,36 +479,49 @@ mostly useful as an alternative to the C pragma, but also provides the opportunity to introduce typing and other attributes for such variables. See L. -=head2 Support for version tuples +=head2 Support for strings represented as a vector of ordinals -Literals of the form v1.2.3.4 are now parsed as the utf8 string -C<"\x{1}\x{2}\x{3}\x{4}">. This allows comparing version numbers using -regular string comparison operators C, C, C, C etc. +Literals of the form C are now parsed as a string composed of +of characters with the specified ordinals. This is an alternative, more +readable way to construct (possibly unicode) strings instead of +interpolating characters, as in C<"\x{1}\x{2}\x{3}\x{4}">. The leading +C may be omitted if there are more than two ordinals, so C<1.2.3> is +parsed the same as C. -These "dotted tuples" are dual-valued. They are both strings of utf8 -characters, and floating point numbers. Thus v1.2.3.4 has the string -value C<"\x{1}\x{2}\x{3}\x{4}"> and the numeric value 1.002_003_004. -As another example, v5.5.640 has the string value C<"\x{5}\x{5}\x{280}"> -(remember 280 hexadecimal is 640 decimal) and the numeric value -5.005_64. +Strings written in this form are also useful to represent version "numbers". +It is easy to compare such version "numbers" (which are really just plain +strings) using any of the usual string comparison operators C, C, +C, C, etc., or perform bitwise string operations on them using C<|>, +C<&>, etc. In conjunction with the new C<$^V> magic variable (which contains -the perl version in this format), such literals can be used to -check if you're running a particular version of Perl. +the perl version as a string), such literals can be used as a readable way +to check if you're running a particular version of Perl: + # this will parse in older versions of Perl also if ($^V and $^V gt v5.5.640) { - # new style version numbers are supported + # new features supported } -C and C also support such literals: +C and C also have some special magic to support such literals. +They will be interpreted as a version rather than as a module name: + + require v5.6.0; # croak if $^V lt v5.6.0 + use v5.6.0; # same, but croaks at compile-time - require v5.6.0; # croak if $^V lt v5.6.0 - use v5.6.0; # same, but croaks at compile-time +Alternatively, the C may be omitted if there is more than one dot: -C and C support the Perl-specific format type C<%v> -to print arbitrary strings as dotted tuples. + require 5.6.0; + use 5.6.0; - printf "v%v", $^V; # prints current version, such as "v5.5.650" +Also, C and C support the Perl-specific format flag C<%v> +to print ordinals of characters in arbitrary strings: + + printf "v%vd", $^V; # prints current version, such as "v5.5.650" + printf "%*vX", ":", $addr; # formats IPv6 address + printf "%*vb", " ", $bits; # displays bitstring + +See L for additional information. =head2 Weak references @@ -638,7 +677,24 @@ Unfortunately bit arithmetics (&, |, ^, ~, <<, >>) for numbers are not 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. +not limited in their width, you can use the & | ^ ~ operators on such +scalars. + +There are actually two modes of 64-bitness: the first one is achieved +using Configure -Duse64bits and the second one using Configure +-Dusefull64bits. The difference is that the first one is minimal and +the second one maximal. The first one does only as much as is +required to get 64-bit integers into Perl (this may mean, for example, +using "long longs") while your memory may still be limited to 2 +gigabytes (because your pointers most likely are 32-bit); the second +one goes all the way by attempting to switch also longs (and pointers) +being 64-bit. This may create an even more binary incompatible Perl +than -Duse64bits: the resulting executable may not run at all in a +CPU-bit box, or you may have to reboot/reconfigure/rebuild your +operating system to be 64-bit aware. + +Natively 64-bit systems like Alpha and Cray need neither -Duse64bits +nor -Dusefull64bits. Last but not least: note that due to Perl's habit of always using floating point numbers the quads are still not true integers. @@ -848,9 +904,12 @@ only during normal running are warranted. See L. =head2 New variable $^V contains Perl version in v5.6.0 format -C<$^V> contains the Perl version number as a version tuple that -can be used in string or numeric comparisons. See -C for an example. +C<$^V> contains the Perl version number as a string composed of +characters whose ordinals match the version numbers, so that it may +be used in string comparisons. + +See C for an +example. =head2 Optional Y2K warnings @@ -859,7 +918,7 @@ it emits optional warnings when concatenating the number 19 with another number. This behavior must be specifically enabled when running Configure. -See L and L. +See F and F. =head1 Significant bug fixes @@ -1385,6 +1444,11 @@ For other details, see L. The Devel::Peek module provides access to the internal representation of Perl variables and data. It is a data debugging tool for the XS programmer. +=item English + +$PERL_VERSION now stands for C<$^V> (a string value) rather than for C<$]> +(a numeric value). + =item ExtUtils::MakeMaker change#4135, also needs docs in module pod @@ -1397,8 +1461,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 @@ -2236,7 +2303,7 @@ when you meant my ($foo, $bar) = @_; -Remember that "my", "our" and "local" bind closer than comma. +Remember that "my", "our", and "local" bind tighter than comma. =item Possible Y2K bug: %s