Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RFC: perlfeaturedelta

by Joost (Canon)
on Aug 08, 2004 at 16:14 UTC ( #381061=perlmeditation: print w/ replies, xml ) Need Help??

Fellow monks,

As I mentioned yesterday, I was looking for a quick reference on wich perl features were introduced in which perl version.

As there appears to be no such document, and it seemed useful, I went through the perldelta's for v5.8.0 to v5.8.5 and made a compacted list of all the features and fixes I thought were interesting with their corresponding perl version.

I left out some of the bug fixes (notably in the threads and unicode sections), most of the description, and changes in the embedding and extending interface were left out completely, but still this document should make it easier to find out in which perl version your favorite feature was introduced. When you find the perl version, you can read the relevant perlxxxxdelta document for more information.

I hope to complete the list with all perl5 versions from 5.004 to current, but before I go any further with this, I'd like to hear any suggestions on how to improve it.

NAME perlfeaturedelta - changes in perl features DESCRIPTION This document describes changes in features and notable bugs betwe +en perl versions 5.8,0 - 5.8.5. Version numbers indicate the perl ver +sion when a feature was introduced, deprecated or removed or a bug was +fixed. See the perldelta document for that version for more details about + the changes. See the perlhist document for the exact timeline of the different perl versions. For changes in core module versions see corelist (http://zeekat.nl/docs/perl/corelist.html). UNICODE In general, scripts handling unicode should use the latest stable +perl version available. (currently, this is version 5.8.5) No fixes in unicode handling are present in this document (new fea +tures only). See also "REGULAR EXPRESSIONS" Unicode Character Database versions Perl Unicode database 5.8.4 - 4.0.1 5.8.1 - 4.0.1 5.8.0 - 3.2.0 5.6.1 - 3.0.1 Detect and read BOM-marked and (BOMless) UTF-16 scripts of either endianness. 5.8.5 Warnings on reading invalid utf8 from a filehandle 5.8.1 New Unicode Semantics (no more "use utf8", almost) 5.8.0 New Unicode Properties 5.8.0 binmode(FH) and ":raw" turn off all translation (including unicode +) 5.8.0 \p{Blank} and \p{SpacePerl} 5.8.0 :utf8 pseudo IO layer 5.8.0 STD* handles marked UTF-8 if LC_ALL, LC_CTYPE, LANG =~ "/utf-?8/i" 5.8.0 :encoding() layer 5.8.0 Unicode in hash keys, regexes, tr/// and I/O 5.8.0 skip BOM on scripts 5.8.0 UTF-16 and UCS-2 encoded Perl files should be read correctly 5.8.0 Comparing with utf8 data does not magically upgrade non-utf8 data 5.8.0 Generating illegal Unicode code points causes warning 5.8.0 "IsAlnum", "IsAlpha", and "IsWord" now match titlecase. 5.8.0 ".", and variable interpolation, "eq", "substr", "reverse", "quote +meta", "x", "s///", and single-quoted UTF-8 5.8.0 REGULAR EXPRESSIONS Matching on the intersection of two Unicode character classes. 5.8.5 Refering to user-defined character classes from within other user defined character classes. 5.8.5 Correct pragmata propagation into (?{...}) constructions in regexp +s. 5.8.4 POSIX regex features [[.cc.]] and [[=c=]] give fatal error 5.8.0 (previously unsafely ignored) Unicode in regexes 5.8.0 $^N variable 5.8.0 Allow a read-only string on the left-hand side of a non-modifying +tr///. 5.8.0 "[[:space:]]" includes vertical tab character 5.8.0 "[[:blank:]]" character class added 5.8.0 ITHREADS In general, scripts using threads should use the latest stable per +l version available. (currently, this is version 5.8.5). The same is probably true for using fork() on Win32 systems. Note that the old threads (5.005 Thread.pm) implementation has bee +n deprecated since 5.8.0. This document doesn't list most fixes in threading, because up til +l now there have been too many fixes for each release. Creating a new thread when weak references exist 5.8.5 Thread creation performance improved 5.8.5 threads->create() returns "undef" if thead creation fails 5.8.5 detached threads supported on windows. 5.8.4 threads support on cygwin 5.8.1 ithreads (threads.pm) 5.8.0 5.005 threads model (module "Thread") deprecated 5.8.0 CLONE subroutine 5.8.0 $AUTOLOAD, sort(), lock(), and spawning subprocesses are thread-sa +fe. 5.8.0 FILES glob() on unreadable directories 5.8.5 glob() returns filenames in alphabetical order on all platforms 5.8.0 pipe open in list form (open KID_PS, "-|", "ps", "aux") 5.8.0 (platforms supporting fork() only) open($fh,'>', \$variable) 5.8.0 Anonymous temp files via open($fh,"+>", undef) 5.8.0 PerlIO as default (implies IO layers) 5.8.0 line numbers > 65536 (affects line number reporting only) 5.8.1 "utime undef, undef, @files" 5.8.0 mkdir() ignores trailing slashes in the directory name 5.8.0 TIE SCALAR for tied hashes 5.8.3 Negative index handling on tied arrays 5.8.1 Recursive calls to FETCH et. al. 5.8.1 warn() and die() write to tied "STDERR". 5.8.0 TAINTING "exec LIST" and "system LIST" warn on tainted data 5.8.0 "${^TAINT}" variable 5.8.0 taint propagation fixes 5.8.0 V-STRINGS single number vstrings before => are normal strings 5.8.1 (interpreted as vstring in versions 5.6.0 - 5.8.0) "eval "v200"" 5.8.0 "fields", "base" AND "attributes" Attributes for "my" variables handled at run-time 5.8.0 "our" attribute "unique" 5.8.0 Attributes work with our(). 5.8.0 PACK/UNPACK pack/unpack D/F recycled 5.8.0 "j", "J", "F", and "D" 5.8.0 "pack('U0a*', ...)" forces string to UTF-8. 5.8.0 pack "Z" correctly terminates the string with "\0". 5.8.0 MATH AND NUMBERS + - * / on integers use integer math 5.8.0 (previously, used floating point math) The numerical comparison operators return "undef" on NaN 5.8.0 Underscore between any digits allowed 5.8.0 Non-decimal number strings are conistent on all platforms ("0x32" +==0) 5.8.0 Infinity is a number. 5.8.0 printf() no longer resets the numeric locale to "C". 5.8.0 Printing quads (64-bit integers) with printf/sprintf now works wit +hout prefixes on 64 bit systems 5.8.0 OVERRIDABLE BUILTINS readline() 5.8.0 GENERAL FEATURES format enhancements 5.8.4 extra hash randomisation (unpredictable hash-key ordering) 5.8.1 one-at-a-time hash algorithm (other hash-key ordering) 5.8.0 %ENV values longer than 255 bytes 5.8.1 (max is now 32640 bytes) automatic binmode() on sockets and pipes on Win32 5.8.1 reference to reference stringifies as REF(...) Instead Of SCALAR(. +..) 5.8.0 Restricted Hashes (via Hash::Util) 5.8.0 Arrays always interpolate in strings 5.8.0 sub AUTOLOAD :lvalue 5.8.0 "perl -d:Module=arg,arg,arg" (multiple arguments) 5.8.0 overridable chop() and chomp() 5.8.0 END blocks run even if you exit/die in a BEGIN block. 5.8.0 Formats support zero-padded decimal fields. 5.8.0 Lvalue subroutines can return "undef" in list context 5.8.0 "no Module;" without unimport() method 5.8.0 "pack() / unpack()" group/repeat/count template letters with "()" 5.8.0 printf() and sprintf() parameter reordering ("%\d+\$" and "*\d+\$" +) 5.8.0 prototype(\[$@%&]) (create references) 5.8.0 Tied hash interfaces are required to have EXISTS and DELETE 5.8.0 SIGNALS Safe signals 5.8.0 safe signals can be disabled with PERL_SIGNALS 5.8.1 SIGPIPE while printing on to a closed socket 5.8.1 SIGFPE restored when calling external programs 5.8.1 LOCAL local ${$x} 5.8.1 local($TIED_VARIABLE) memory leak fixed 5.8.0 (but local @tied_array; and local %tied_hash; are broken +!) Localised hash elements are correctly unlocalised to not exist, if + they didn't before they were localised. 5.8.0 COMMAND LINE AND ENVIRONMENT perl -t 5.8.0 $^X makes better attempt to get full path 5.8.0 -s and -F supported on #! line 5.8.0 PERL5OPT with embedded spaces 5.8.0 GENERAL BUG FIXES In-place sort optimisation fixed (bug introduced in 5.8.4) 5.8.5 Optimisation for unnecessary assignments gives spurious warnings (introduced in 5.8.4) 5.8.5 "$a .. $b" when either $a or $b is "undef" 5.8.3 reading $^E preserves $! and errno 5.8.3 pipes using local rather than global DCL symbols for IPC 5.8.1 return value of the ioctl() built-in function fixed on Win32 5.8.1 (broken in 5.8.0) select() with 4-args on Win32 5.8.1 binmode(FH, ":crlf") on Win32 5.8.1 $Config{byteorder} if sizeof(long) is 4 and sizeof(IV) is 8. 5.8.0 "do keyword" calls keyword instead of &keyword 5.8.0 glob() errors fixed 5.6.1 POSIX::sleep() returns the number of *unslept* seconds 5.8.0 caller() returns a subroutine name of "(unknown)" for removed subs 5.8.0 (could dump core) More predictable order of DESTROYs 5.8.0 *foo{FORMAT} works 5.8.0 lexicals outside an eval "" always resolved inside the eval "" 5.8.0 lexicals don't leak at file scope into previously declared subs 5.8.0 lexical warnings propagate correctly into scopes and eval "" 5.8.0 Several eval "" memory leaks fixed 5.8.0 scalar() forces scalar context even when used in void context 5.8.0 OPTIMIZATIONS inplace sort 5.8.4 (buggy, fixed in 5.8.5) unnecessary assignment 5.8.4 (buggy, fixed in 5.8.5) sort() uses mergesort (better worst-case performance, and stable) 5.8.0 "map" in scalar context 5.8.4 "map" in void context 5.8.1 unshift() 5.8.0 getpwent() didn't work on some shadow systems. fixed. 5.8.0 SOCKS support improved 5.8.0 DEPRECATED Version numbers indicate perl versions where the feature was *deprecated*. chdir("") or chdir(undef) 5.8.0 dump() builtin 5.8.0 \8 \9 in string 5.8.0 *glob{FILEHANDLE} (use *glob{IO} instead) 5.8.0 package; (without argument) 5.8.0 pseudohashes 5.8.0 (fields.pm now uses restricted hashes) "@a->[...]" and "%h->{...}" 5.8.0 suidperl 5.8.0 sub foo (@bar) "prototype" 5.8.0 local @tied_array; and local %tied_hash; restoration of old value +is broken 5.8.0 (may have been broken earlier) lstat(FILEHANDLE) 5.8.0 (never made sense) REMOVED Version numbers indicate perl versions where the feature was *remo +ved*. bless(REF, REF) 5.8.0 chat2 library 5.8.0 EQ, NE, LT, LE, GE, GT 5.8.0 tr///C and tr///U 5.6.1

Updates:
after re-reading, tr///U seems to have been removed in 5.6.1. I'm not sure what it was supposed to do, except that it had to do with unicode translations.

Fixed the sigils on %tied_hash and @tied_array.

Thanks to premchai21

Joost.

Comment on RFC: perlfeaturedelta
Download Code
Re: RFC: perlfeaturedelta
by premchai21 (Curate) on Aug 08, 2004 at 17:39 UTC

    H'm. I can't seem to find any reference to tr///u in the docs for 5.8.4? It gives a syntax error when I use it with perl -e.

    %tied_array and @tied_hash seem to have backwards sigils.

    Very good idea, though. I've been looking for something that tells me which features were introduced when so I can know which version of perl my program requires rather than just sort of blindly guessing or requiring whatever I have (which is often not necessary).

Re: RFC: perlfeaturedelta
by osfameron (Hermit) on Aug 12, 2004 at 07:22 UTC
    Excellent idea: I wonder though if it wouldn't be better to extend perldoc with a switch to search the perlxxxdelta pages.

    So, just as we already have:

     perldoc -f function
     perlfoc -q FAQ
    add a switch:
     perldoc -D delta_thing
    I'd also like a -k switch to search for keywords (I regularly forget where things like BEGIN and AUTOLOAD live).

      I'd also like a -k switch to search for keywords (I regularly forget where things like BEGIN and AUTOLOAD live).

      Now that's an idea. ++

      This should be posted to perl5-porters, seriously.

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://381061]
Approved by Enlil
Front-paged by Enlil
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-08-30 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls