1PERL5100DELTA(1)       Perl Programmers Reference Guide       PERL5100DELTA(1)
2
3
4

NAME

6       perl5100delta - what is new for perl 5.10.0
7

DESCRIPTION

9       This document describes the differences between the 5.8.8 release and
10       the 5.10.0 release.
11
12       Many of the bug fixes in 5.10.0 were already seen in the 5.8.X
13       maintenance releases; they are not duplicated here and are documented
14       in the set of man pages named perl58[1-8]?delta.
15

Core Enhancements

17   The "feature" pragma
18       The "feature" pragma is used to enable new syntax that would break
19       Perl's backwards-compatibility with older releases of the language.
20       It's a lexical pragma, like "strict" or "warnings".
21
22       Currently the following new features are available: "switch" (adds a
23       switch statement), "say" (adds a "say" built-in function), and "state"
24       (adds a "state" keyword for declaring "static" variables). Those
25       features are described in their own sections of this document.
26
27       The "feature" pragma is also implicitly loaded when you require a
28       minimal perl version (with the "use VERSION" construct) greater than,
29       or equal to, 5.9.5. See feature for details.
30
31   New -E command-line switch
32       -E is equivalent to -e, but it implicitly enables all optional features
33       (like "use feature ":5.10"").
34
35   Defined-or operator
36       A new operator "//" (defined-or) has been implemented.  The following
37       expression:
38
39           $a // $b
40
41       is merely equivalent to
42
43          defined $a ? $a : $b
44
45       and the statement
46
47          $c //= $d;
48
49       can now be used instead of
50
51          $c = $d unless defined $c;
52
53       The "//" operator has the same precedence and associativity as "||".
54       Special care has been taken to ensure that this operator Do What You
55       Mean while not breaking old code, but some edge cases involving the
56       empty regular expression may now parse differently.  See perlop for
57       details.
58
59   Switch and Smart Match operator
60       Perl 5 now has a switch statement. It's available when "use feature
61       'switch'" is in effect. This feature introduces three new keywords,
62       "given", "when", and "default":
63
64           given ($foo) {
65               when (/^abc/) { $abc = 1; }
66               when (/^def/) { $def = 1; }
67               when (/^xyz/) { $xyz = 1; }
68               default { $nothing = 1; }
69           }
70
71       A more complete description of how Perl matches the switch variable
72       against the "when" conditions is given in "Switch statements" in
73       perlsyn.
74
75       This kind of match is called smart match, and it's also possible to use
76       it outside of switch statements, via the new "~~" operator. See "Smart
77       matching in detail" in perlsyn.
78
79       This feature was contributed by Robin Houston.
80
81   Regular expressions
82       Recursive Patterns
83           It is now possible to write recursive patterns without using the
84           "(??{})" construct. This new way is more efficient, and in many
85           cases easier to read.
86
87           Each capturing parenthesis can now be treated as an independent
88           pattern that can be entered by using the "(?PARNO)" syntax ("PARNO"
89           standing for "parenthesis number"). For example, the following
90           pattern will match nested balanced angle brackets:
91
92               /
93                ^                      # start of line
94                (                      # start capture buffer 1
95                   <                   #   match an opening angle bracket
96                   (?:                 #   match one of:
97                       (?>             #     don't backtrack over the inside of this group
98                           [^<>]+      #       one or more non angle brackets
99                       )               #     end non backtracking group
100                   |                   #     ... or ...
101                       (?1)            #     recurse to bracket 1 and try it again
102                   )*                  #   0 or more times.
103                   >                   #   match a closing angle bracket
104                )                      # end capture buffer one
105                $                      # end of line
106               /x
107
108           PCRE users should note that Perl's recursive regex feature allows
109           backtracking into a recursed pattern, whereas in PCRE the recursion
110           is atomic or "possessive" in nature.  As in the example above, you
111           can add (?>) to control this selectively.  (Yves Orton)
112
113       Named Capture Buffers
114           It is now possible to name capturing parenthesis in a pattern and
115           refer to the captured contents by name. The naming syntax is
116           "(?<NAME>....)".  It's possible to backreference to a named buffer
117           with the "\k<NAME>" syntax. In code, the new magical hashes "%+"
118           and "%-" can be used to access the contents of the capture buffers.
119
120           Thus, to replace all doubled chars with a single copy, one could
121           write
122
123               s/(?<letter>.)\k<letter>/$+{letter}/g
124
125           Only buffers with defined contents will be "visible" in the "%+"
126           hash, so it's possible to do something like
127
128               foreach my $name (keys %+) {
129                   print "content of buffer '$name' is $+{$name}\n";
130               }
131
132           The "%-" hash is a bit more complete, since it will contain array
133           refs holding values from all capture buffers similarly named, if
134           there should be many of them.
135
136           "%+" and "%-" are implemented as tied hashes through the new module
137           "Tie::Hash::NamedCapture".
138
139           Users exposed to the .NET regex engine will find that the perl
140           implementation differs in that the numerical ordering of the
141           buffers is sequential, and not "unnamed first, then named". Thus in
142           the pattern
143
144              /(A)(?<B>B)(C)(?<D>D)/
145
146           $1 will be 'A', $2 will be 'B', $3 will be 'C' and $4 will be 'D'
147           and not $1 is 'A', $2 is 'C' and $3 is 'B' and $4 is 'D' that a
148           .NET programmer would expect. This is considered a feature. :-)
149           (Yves Orton)
150
151       Possessive Quantifiers
152           Perl now supports the "possessive quantifier" syntax of the "atomic
153           match" pattern. Basically a possessive quantifier matches as much
154           as it can and never gives any back. Thus it can be used to control
155           backtracking. The syntax is similar to non-greedy matching, except
156           instead of using a '?' as the modifier the '+' is used. Thus "?+",
157           "*+", "++", "{min,max}+" are now legal quantifiers. (Yves Orton)
158
159       Backtracking control verbs
160           The regex engine now supports a number of special-purpose backtrack
161           control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT),
162           (*FAIL) and (*ACCEPT). See perlre for their descriptions. (Yves
163           Orton)
164
165       Relative backreferences
166           A new syntax "\g{N}" or "\gN" where "N" is a decimal integer allows
167           a safer form of back-reference notation as well as allowing
168           relative backreferences. This should make it easier to generate and
169           embed patterns that contain backreferences. See "Capture buffers"
170           in perlre. (Yves Orton)
171
172       "\K" escape
173           The functionality of Jeff Pinyan's module Regexp::Keep has been
174           added to the core. In regular expressions you can now use the
175           special escape "\K" as a way to do something like floating length
176           positive lookbehind. It is also useful in substitutions like:
177
178             s/(foo)bar/$1/g
179
180           that can now be converted to
181
182             s/foo\Kbar//g
183
184           which is much more efficient. (Yves Orton)
185
186       Vertical and horizontal whitespace, and linebreak
187           Regular expressions now recognize the "\v" and "\h" escapes that
188           match vertical and horizontal whitespace, respectively. "\V" and
189           "\H" logically match their complements.
190
191           "\R" matches a generic linebreak, that is, vertical whitespace,
192           plus the multi-character sequence "\x0D\x0A".
193
194   "say()"
195       say() is a new built-in, only available when "use feature 'say'" is in
196       effect, that is similar to print(), but that implicitly appends a
197       newline to the printed string. See "say" in perlfunc. (Robin Houston)
198
199   Lexical $_
200       The default variable $_ can now be lexicalized, by declaring it like
201       any other lexical variable, with a simple
202
203           my $_;
204
205       The operations that default on $_ will use the lexically-scoped version
206       of $_ when it exists, instead of the global $_.
207
208       In a "map" or a "grep" block, if $_ was previously my'ed, then the $_
209       inside the block is lexical as well (and scoped to the block).
210
211       In a scope where $_ has been lexicalized, you can still have access to
212       the global version of $_ by using $::_, or, more simply, by overriding
213       the lexical declaration with "our $_". (Rafael Garcia-Suarez)
214
215   The "_" prototype
216       A new prototype character has been added. "_" is equivalent to "$" but
217       defaults to $_ if the corresponding argument isn't supplied (both "$"
218       and "_" denote a scalar). Due to the optional nature of the argument,
219       you can only use it at the end of a prototype, or before a semicolon.
220
221       This has a small incompatible consequence: the prototype() function has
222       been adjusted to return "_" for some built-ins in appropriate cases
223       (for example, "prototype('CORE::rmdir')"). (Rafael Garcia-Suarez)
224
225   UNITCHECK blocks
226       "UNITCHECK", a new special code block has been introduced, in addition
227       to "BEGIN", "CHECK", "INIT" and "END".
228
229       "CHECK" and "INIT" blocks, while useful for some specialized purposes,
230       are always executed at the transition between the compilation and the
231       execution of the main program, and thus are useless whenever code is
232       loaded at runtime. On the other hand, "UNITCHECK" blocks are executed
233       just after the unit which defined them has been compiled. See perlmod
234       for more information. (Alex Gough)
235
236   New Pragma, "mro"
237       A new pragma, "mro" (for Method Resolution Order) has been added. It
238       permits to switch, on a per-class basis, the algorithm that perl uses
239       to find inherited methods in case of a multiple inheritance hierarchy.
240       The default MRO hasn't changed (DFS, for Depth First Search). Another
241       MRO is available: the C3 algorithm. See mro for more information.
242       (Brandon Black)
243
244       Note that, due to changes in the implementation of class hierarchy
245       search, code that used to undef the *ISA glob will most probably break.
246       Anyway, undef'ing *ISA had the side-effect of removing the magic on the
247       @ISA array and should not have been done in the first place. Also, the
248       cache *::ISA::CACHE:: no longer exists; to force reset the @ISA cache,
249       you now need to use the "mro" API, or more simply to assign to @ISA
250       (e.g. with "@ISA = @ISA").
251
252   readdir() may return a "short filename" on Windows
253       The readdir() function may return a "short filename" when the long
254       filename contains characters outside the ANSI codepage.  Similarly
255       Cwd::cwd() may return a short directory name, and glob() may return
256       short names as well.  On the NTFS file system these short names can
257       always be represented in the ANSI codepage.  This will not be true for
258       all other file system drivers; e.g. the FAT filesystem stores short
259       filenames in the OEM codepage, so some files on FAT volumes remain
260       unaccessible through the ANSI APIs.
261
262       Similarly, $^X, @INC, and $ENV{PATH} are preprocessed at startup to
263       make sure all paths are valid in the ANSI codepage (if possible).
264
265       The Win32::GetLongPathName() function now returns the UTF-8 encoded
266       correct long file name instead of using replacement characters to force
267       the name into the ANSI codepage.  The new Win32::GetANSIPathName()
268       function can be used to turn a long pathname into a short one only if
269       the long one cannot be represented in the ANSI codepage.
270
271       Many other functions in the "Win32" module have been improved to accept
272       UTF-8 encoded arguments.  Please see Win32 for details.
273
274   readpipe() is now overridable
275       The built-in function readpipe() is now overridable. Overriding it
276       permits also to override its operator counterpart, "qx//" (a.k.a.
277       "``").  Moreover, it now defaults to $_ if no argument is provided.
278       (Rafael Garcia-Suarez)
279
280   Default argument for readline()
281       readline() now defaults to *ARGV if no argument is provided. (Rafael
282       Garcia-Suarez)
283
284   state() variables
285       A new class of variables has been introduced. State variables are
286       similar to "my" variables, but are declared with the "state" keyword in
287       place of "my". They're visible only in their lexical scope, but their
288       value is persistent: unlike "my" variables, they're not undefined at
289       scope entry, but retain their previous value. (Rafael Garcia-Suarez,
290       Nicholas Clark)
291
292       To use state variables, one needs to enable them by using
293
294           use feature 'state';
295
296       or by using the "-E" command-line switch in one-liners.  See
297       "Persistent Private Variables" in perlsub.
298
299   Stacked filetest operators
300       As a new form of syntactic sugar, it's now possible to stack up
301       filetest operators. You can now write "-f -w -x $file" in a row to mean
302       "-x $file && -w _ && -f _". See "-X" in perlfunc.
303
304   UNIVERSAL::DOES()
305       The "UNIVERSAL" class has a new method, "DOES()". It has been added to
306       solve semantic problems with the "isa()" method. "isa()" checks for
307       inheritance, while "DOES()" has been designed to be overridden when
308       module authors use other types of relations between classes (in
309       addition to inheritance). (chromatic)
310
311       See "$obj->DOES( ROLE )" in UNIVERSAL.
312
313   Formats
314       Formats were improved in several ways. A new field, "^*", can be used
315       for variable-width, one-line-at-a-time text. Null characters are now
316       handled correctly in picture lines. Using "@#" and "~~" together will
317       now produce a compile-time error, as those format fields are
318       incompatible.  perlform has been improved, and miscellaneous bugs
319       fixed.
320
321   Byte-order modifiers for pack() and unpack()
322       There are two new byte-order modifiers, ">" (big-endian) and "<"
323       (little-endian), that can be appended to most pack() and unpack()
324       template characters and groups to force a certain byte-order for that
325       type or group.  See "pack" in perlfunc and perlpacktut for details.
326
327   "no VERSION"
328       You can now use "no" followed by a version number to specify that you
329       want to use a version of perl older than the specified one.
330
331   "chdir", "chmod" and "chown" on filehandles
332       "chdir", "chmod" and "chown" can now work on filehandles as well as
333       filenames, if the system supports respectively "fchdir", "fchmod" and
334       "fchown", thanks to a patch provided by Gisle Aas.
335
336   OS groups
337       $( and $) now return groups in the order where the OS returns them,
338       thanks to Gisle Aas. This wasn't previously the case.
339
340   Recursive sort subs
341       You can now use recursive subroutines with sort(), thanks to Robin
342       Houston.
343
344   Exceptions in constant folding
345       The constant folding routine is now wrapped in an exception handler,
346       and if folding throws an exception (such as attempting to evaluate
347       0/0), perl now retains the current optree, rather than aborting the
348       whole program.  Without this change, programs would not compile if they
349       had expressions that happened to generate exceptions, even though those
350       expressions were in code that could never be reached at runtime.
351       (Nicholas Clark, Dave Mitchell)
352
353   Source filters in @INC
354       It's possible to enhance the mechanism of subroutine hooks in @INC by
355       adding a source filter on top of the filehandle opened and returned by
356       the hook. This feature was planned a long time ago, but wasn't quite
357       working until now. See "require" in perlfunc for details. (Nicholas
358       Clark)
359
360   New internal variables
361       "${^RE_DEBUG_FLAGS}"
362           This variable controls what debug flags are in effect for the
363           regular expression engine when running under "use re "debug"". See
364           re for details.
365
366       "${^CHILD_ERROR_NATIVE}"
367           This variable gives the native status returned by the last pipe
368           close, backtick command, successful call to wait() or waitpid(), or
369           from the system() operator. See perlvar for details. (Contributed
370           by Gisle Aas.)
371
372       "${^RE_TRIE_MAXBUF}"
373           See "Trie optimisation of literal string alternations".
374
375       "${^WIN32_SLOPPY_STAT}"
376           See "Sloppy stat on Windows".
377
378   Miscellaneous
379       "unpack()" now defaults to unpacking the $_ variable.
380
381       "mkdir()" without arguments now defaults to $_.
382
383       The internal dump output has been improved, so that non-printable
384       characters such as newline and backspace are output in "\x" notation,
385       rather than octal.
386
387       The -C option can no longer be used on the "#!" line. It wasn't working
388       there anyway, since the standard streams are already set up at this
389       point in the execution of the perl interpreter. You can use binmode()
390       instead to get the desired behaviour.
391
392   UCD 5.0.0
393       The copy of the Unicode Character Database included in Perl 5 has been
394       updated to version 5.0.0.
395
396   MAD
397       MAD, which stands for Miscellaneous Attribute Decoration, is a still-
398       in-development work leading to a Perl 5 to Perl 6 converter. To enable
399       it, it's necessary to pass the argument "-Dmad" to Configure. The
400       obtained perl isn't binary compatible with a regular perl 5.10, and has
401       space and speed penalties; moreover not all regression tests still pass
402       with it. (Larry Wall, Nicholas Clark)
403
404   kill() on Windows
405       On Windows platforms, "kill(-9, $pid)" now kills a process tree.  (On
406       UNIX, this delivers the signal to all processes in the same process
407       group.)
408

Incompatible Changes

410   Packing and UTF-8 strings
411       The semantics of pack() and unpack() regarding UTF-8-encoded data has
412       been changed. Processing is now by default character per character
413       instead of byte per byte on the underlying encoding. Notably, code that
414       used things like "pack("a*", $string)" to see through the encoding of
415       string will now simply get back the original $string. Packed strings
416       can also get upgraded during processing when you store upgraded
417       characters. You can get the old behaviour by using "use bytes".
418
419       To be consistent with pack(), the "C0" in unpack() templates indicates
420       that the data is to be processed in character mode, i.e. character by
421       character; on the contrary, "U0" in unpack() indicates UTF-8 mode,
422       where the packed string is processed in its UTF-8-encoded Unicode form
423       on a byte by byte basis. This is reversed with regard to perl 5.8.X,
424       but now consistent between pack() and unpack().
425
426       Moreover, "C0" and "U0" can also be used in pack() templates to specify
427       respectively character and byte modes.
428
429       "C0" and "U0" in the middle of a pack or unpack format now switch to
430       the specified encoding mode, honoring parens grouping. Previously,
431       parens were ignored.
432
433       Also, there is a new pack() character format, "W", which is intended to
434       replace the old "C". "C" is kept for unsigned chars coded as bytes in
435       the strings internal representation. "W" represents unsigned (logical)
436       character values, which can be greater than 255. It is therefore more
437       robust when dealing with potentially UTF-8-encoded data (as "C" will
438       wrap values outside the range 0..255, and not respect the string
439       encoding).
440
441       In practice, that means that pack formats are now encoding-neutral,
442       except "C".
443
444       For consistency, "A" in unpack() format now trims all Unicode
445       whitespace from the end of the string. Before perl 5.9.2, it used to
446       strip only the classical ASCII space characters.
447
448   Byte/character count feature in unpack()
449       A new unpack() template character, ".", returns the number of bytes or
450       characters (depending on the selected encoding mode, see above) read so
451       far.
452
453   The $* and $# variables have been removed
454       $*, which was deprecated in favor of the "/s" and "/m" regexp
455       modifiers, has been removed.
456
457       The deprecated $# variable (output format for numbers) has been
458       removed.
459
460       Two new severe warnings, "$#/$* is no longer supported", have been
461       added.
462
463   substr() lvalues are no longer fixed-length
464       The lvalues returned by the three argument form of substr() used to be
465       a "fixed length window" on the original string. In some cases this
466       could cause surprising action at distance or other undefined behaviour.
467       Now the length of the window adjusts itself to the length of the string
468       assigned to it.
469
470   Parsing of "-f _"
471       The identifier "_" is now forced to be a bareword after a filetest
472       operator. This solves a number of misparsing issues when a global "_"
473       subroutine is defined.
474
475   ":unique"
476       The ":unique" attribute has been made a no-op, since its current
477       implementation was fundamentally flawed and not threadsafe.
478
479   Effect of pragmas in eval
480       The compile-time value of the "%^H" hint variable can now propagate
481       into eval("")uated code. This makes it more useful to implement lexical
482       pragmas.
483
484       As a side-effect of this, the overloaded-ness of constants now
485       propagates into eval("").
486
487   chdir FOO
488       A bareword argument to chdir() is now recognized as a file handle.
489       Earlier releases interpreted the bareword as a directory name.  (Gisle
490       Aas)
491
492   Handling of .pmc files
493       An old feature of perl was that before "require" or "use" look for a
494       file with a .pm extension, they will first look for a similar filename
495       with a .pmc extension. If this file is found, it will be loaded in
496       place of any potentially existing file ending in a .pm extension.
497
498       Previously, .pmc files were loaded only if more recent than the
499       matching .pm file. Starting with 5.9.4, they'll be always loaded if
500       they exist.
501
502   $^V is now a "version" object instead of a v-string
503       $^V can still be used with the %vd format in printf, but any character-
504       level operations will now access the string representation of the
505       "version" object and not the ordinals of a v-string.  Expressions like
506       "substr($^V, 0, 2)" or "split //, $^V" no longer work and must be
507       rewritten.
508
509   @- and @+ in patterns
510       The special arrays "@-" and "@+" are no longer interpolated in regular
511       expressions. (Sadahiro Tomoyuki)
512
513   $AUTOLOAD can now be tainted
514       If you call a subroutine by a tainted name, and if it defers to an
515       AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted.  (Rick
516       Delaney)
517
518   Tainting and printf
519       When perl is run under taint mode, "printf()" and "sprintf()" will now
520       reject any tainted format argument. (Rafael Garcia-Suarez)
521
522   undef and signal handlers
523       Undefining or deleting a signal handler via "undef $SIG{FOO}" is now
524       equivalent to setting it to 'DEFAULT'. (Rafael Garcia-Suarez)
525
526   strictures and dereferencing in defined()
527       "use strict 'refs'" was ignoring taking a hard reference in an argument
528       to defined(), as in :
529
530           use strict 'refs';
531           my $x = 'foo';
532           if (defined $$x) {...}
533
534       This now correctly produces the run-time error "Can't use string as a
535       SCALAR ref while "strict refs" in use".
536
537       "defined @$foo" and "defined %$bar" are now also subject to "strict
538       'refs'" (that is, $foo and $bar shall be proper references there.)
539       ("defined(@foo)" and "defined(%bar)" are discouraged constructs
540       anyway.)  (Nicholas Clark)
541
542   "(?p{})" has been removed
543       The regular expression construct "(?p{})", which was deprecated in perl
544       5.8, has been removed. Use "(??{})" instead. (Rafael Garcia-Suarez)
545
546   Pseudo-hashes have been removed
547       Support for pseudo-hashes has been removed from Perl 5.9. (The "fields"
548       pragma remains here, but uses an alternate implementation.)
549
550   Removal of the bytecode compiler and of perlcc
551       "perlcc", the byteloader and the supporting modules (B::C, B::CC,
552       B::Bytecode, etc.) are no longer distributed with the perl sources.
553       Those experimental tools have never worked reliably, and, due to the
554       lack of volunteers to keep them in line with the perl interpreter
555       developments, it was decided to remove them instead of shipping a
556       broken version of those.  The last version of those modules can be
557       found with perl 5.9.4.
558
559       However the B compiler framework stays supported in the perl core, as
560       with the more useful modules it has permitted (among others, B::Deparse
561       and B::Concise).
562
563   Removal of the JPL
564       The JPL (Java-Perl Lingo) has been removed from the perl sources
565       tarball.
566
567   Recursive inheritance detected earlier
568       Perl will now immediately throw an exception if you modify any
569       package's @ISA in such a way that it would cause recursive inheritance.
570
571       Previously, the exception would not occur until Perl attempted to make
572       use of the recursive inheritance while resolving a method or doing a
573       "$foo->isa($bar)" lookup.
574

Modules and Pragmata

576   Upgrading individual core modules
577       Even more core modules are now also available separately through the
578       CPAN.  If you wish to update one of these modules, you don't need to
579       wait for a new perl release.  From within the cpan shell, running the
580       'r' command will report on modules with upgrades available.  See
581       "perldoc CPAN" for more information.
582
583   Pragmata Changes
584       "feature"
585           The new pragma "feature" is used to enable new features that might
586           break old code. See "The "feature" pragma" above.
587
588       "mro"
589           This new pragma enables to change the algorithm used to resolve
590           inherited methods. See "New Pragma, "mro"" above.
591
592       Scoping of the "sort" pragma
593           The "sort" pragma is now lexically scoped. Its effect used to be
594           global.
595
596       Scoping of "bignum", "bigint", "bigrat"
597           The three numeric pragmas "bignum", "bigint" and "bigrat" are now
598           lexically scoped. (Tels)
599
600       "base"
601           The "base" pragma now warns if a class tries to inherit from
602           itself.  (Curtis "Ovid" Poe)
603
604       "strict" and "warnings"
605           "strict" and "warnings" will now complain loudly if they are loaded
606           via incorrect casing (as in "use Strict;"). (Johan Vromans)
607
608       "version"
609           The "version" module provides support for version objects.
610
611       "warnings"
612           The "warnings" pragma doesn't load "Carp" anymore. That means that
613           code that used "Carp" routines without having loaded it at compile
614           time might need to be adjusted; typically, the following (faulty)
615           code won't work anymore, and will require parentheses to be added
616           after the function name:
617
618               use warnings;
619               require Carp;
620               Carp::confess 'argh';
621
622       "less"
623           "less" now does something useful (or at least it tries to). In
624           fact, it has been turned into a lexical pragma. So, in your
625           modules, you can now test whether your users have requested to use
626           less CPU, or less memory, less magic, or maybe even less fat. See
627           less for more. (Joshua ben Jore)
628
629   New modules
630       ·   "encoding::warnings", by Audrey Tang, is a module to emit warnings
631           whenever an ASCII character string containing high-bit bytes is
632           implicitly converted into UTF-8. It's a lexical pragma since Perl
633           5.9.4; on older perls, its effect is global.
634
635       ·   "Module::CoreList", by Richard Clamp, is a small handy module that
636           tells you what versions of core modules ship with any versions of
637           Perl 5. It comes with a command-line frontend, "corelist".
638
639       ·   "Math::BigInt::FastCalc" is an XS-enabled, and thus faster, version
640           of "Math::BigInt::Calc".
641
642       ·   "Compress::Zlib" is an interface to the zlib compression library.
643           It comes with a bundled version of zlib, so having a working zlib
644           is not a prerequisite to install it. It's used by "Archive::Tar"
645           (see below).
646
647       ·   "IO::Zlib" is an "IO::"-style interface to "Compress::Zlib".
648
649       ·   "Archive::Tar" is a module to manipulate "tar" archives.
650
651       ·   "Digest::SHA" is a module used to calculate many types of SHA
652           digests, has been included for SHA support in the CPAN module.
653
654       ·   "ExtUtils::CBuilder" and "ExtUtils::ParseXS" have been added.
655
656       ·   "Hash::Util::FieldHash", by Anno Siegel, has been added. This
657           module provides support for field hashes: hashes that maintain an
658           association of a reference with a value, in a thread-safe garbage-
659           collected way.  Such hashes are useful to implement inside-out
660           objects.
661
662       ·   "Module::Build", by Ken Williams, has been added. It's an
663           alternative to "ExtUtils::MakeMaker" to build and install perl
664           modules.
665
666       ·   "Module::Load", by Jos Boumans, has been added. It provides a
667           single interface to load Perl modules and .pl files.
668
669       ·   "Module::Loaded", by Jos Boumans, has been added. It's used to mark
670           modules as loaded or unloaded.
671
672       ·   "Package::Constants", by Jos Boumans, has been added. It's a simple
673           helper to list all constants declared in a given package.
674
675       ·   "Win32API::File", by Tye McQueen, has been added (for Windows
676           builds).  This module provides low-level access to Win32 system API
677           calls for files/dirs.
678
679       ·   "Locale::Maketext::Simple", needed by CPANPLUS, is a simple wrapper
680           around "Locale::Maketext::Lexicon". Note that
681           "Locale::Maketext::Lexicon" isn't included in the perl core; the
682           behaviour of "Locale::Maketext::Simple" gracefully degrades when
683           the later isn't present.
684
685       ·   "Params::Check" implements a generic input parsing/checking
686           mechanism. It is used by CPANPLUS.
687
688       ·   "Term::UI" simplifies the task to ask questions at a terminal
689           prompt.
690
691       ·   "Object::Accessor" provides an interface to create per-object
692           accessors.
693
694       ·   "Module::Pluggable" is a simple framework to create modules that
695           accept pluggable sub-modules.
696
697       ·   "Module::Load::Conditional" provides simple ways to query and
698           possibly load installed modules.
699
700       ·   "Time::Piece" provides an object oriented interface to time
701           functions, overriding the built-ins localtime() and gmtime().
702
703       ·   "IPC::Cmd" helps to find and run external commands, possibly
704           interactively.
705
706       ·   "File::Fetch" provide a simple generic file fetching mechanism.
707
708       ·   "Log::Message" and "Log::Message::Simple" are used by the log
709           facility of "CPANPLUS".
710
711       ·   "Archive::Extract" is a generic archive extraction mechanism for
712           .tar (plain, gziped or bzipped) or .zip files.
713
714       ·   "CPANPLUS" provides an API and a command-line tool to access the
715           CPAN mirrors.
716
717       ·   "Pod::Escapes" provides utilities that are useful in decoding Pod
718           E<...> sequences.
719
720       ·   "Pod::Simple" is now the backend for several of the Pod-related
721           modules included with Perl.
722
723   Selected Changes to Core Modules
724       "Attribute::Handlers"
725           "Attribute::Handlers" can now report the caller's file and line
726           number.  (David Feldman)
727
728           All interpreted attributes are now passed as array references.
729           (Damian Conway)
730
731       "B::Lint"
732           "B::Lint" is now based on "Module::Pluggable", and so can be
733           extended with plugins. (Joshua ben Jore)
734
735       "B" It's now possible to access the lexical pragma hints ("%^H") by
736           using the method B::COP::hints_hash(). It returns a "B::RHE"
737           object, which in turn can be used to get a hash reference via the
738           method B::RHE::HASH(). (Joshua ben Jore)
739
740       "Thread"
741           As the old 5005thread threading model has been removed, in favor of
742           the ithreads scheme, the "Thread" module is now a compatibility
743           wrapper, to be used in old code only. It has been removed from the
744           default list of dynamic extensions.
745

Utility Changes

747       perl -d
748           The Perl debugger can now save all debugger commands for sourcing
749           later; notably, it can now emulate stepping backwards, by
750           restarting and rerunning all bar the last command from a saved
751           command history.
752
753           It can also display the parent inheritance tree of a given class,
754           with the "i" command.
755
756       ptar
757           "ptar" is a pure perl implementation of "tar" that comes with
758           "Archive::Tar".
759
760       ptardiff
761           "ptardiff" is a small utility used to generate a diff between the
762           contents of a tar archive and a directory tree. Like "ptar", it
763           comes with "Archive::Tar".
764
765       shasum
766           "shasum" is a command-line utility, used to print or to check SHA
767           digests. It comes with the new "Digest::SHA" module.
768
769       corelist
770           The "corelist" utility is now installed with perl (see "New
771           modules" above).
772
773       h2ph and h2xs
774           "h2ph" and "h2xs" have been made more robust with regard to
775           "modern" C code.
776
777           "h2xs" implements a new option "--use-xsloader" to force use of
778           "XSLoader" even in backwards compatible modules.
779
780           The handling of authors' names that had apostrophes has been fixed.
781
782           Any enums with negative values are now skipped.
783
784       perlivp
785           "perlivp" no longer checks for *.ph files by default.  Use the new
786           "-a" option to run all tests.
787
788       find2perl
789           "find2perl" now assumes "-print" as a default action. Previously,
790           it needed to be specified explicitly.
791
792           Several bugs have been fixed in "find2perl", regarding "-exec" and
793           "-eval". Also the options "-path", "-ipath" and "-iname" have been
794           added.
795
796       config_data
797           "config_data" is a new utility that comes with "Module::Build". It
798           provides a command-line interface to the configuration of Perl
799           modules that use Module::Build's framework of configurability (that
800           is, *::ConfigData modules that contain local configuration
801           information for their parent modules.)
802
803       cpanp
804           "cpanp", the CPANPLUS shell, has been added. ("cpanp-run-perl", a
805           helper for CPANPLUS operation, has been added too, but isn't
806           intended for direct use).
807
808       cpan2dist
809           "cpan2dist" is a new utility that comes with CPANPLUS. It's a tool
810           to create distributions (or packages) from CPAN modules.
811
812       pod2html
813           The output of "pod2html" has been enhanced to be more customizable
814           via CSS. Some formatting problems were also corrected. (Jari Aalto)
815

New Documentation

817       The perlpragma manpage documents how to write one's own lexical pragmas
818       in pure Perl (something that is possible starting with 5.9.4).
819
820       The new perlglossary manpage is a glossary of terms used in the Perl
821       documentation, technical and otherwise, kindly provided by O'Reilly
822       Media, Inc.
823
824       The perlreguts manpage, courtesy of Yves Orton, describes internals of
825       the Perl regular expression engine.
826
827       The perlreapi manpage describes the interface to the perl interpreter
828       used to write pluggable regular expression engines (by var Arnfjoerd`
829       Bjarmason).
830
831       The perlunitut manpage is an tutorial for programming with Unicode and
832       string encodings in Perl, courtesy of Juerd Waalboer.
833
834       A new manual page, perlunifaq (the Perl Unicode FAQ), has been added
835       (Juerd Waalboer).
836
837       The perlcommunity manpage gives a description of the Perl community on
838       the Internet and in real life. (Edgar "Trizor" Bering)
839
840       The CORE manual page documents the "CORE::" namespace. (Tels)
841
842       The long-existing feature of "/(?{...})/" regexps setting $_ and pos()
843       is now documented.
844

Performance Enhancements

846   In-place sorting
847       Sorting arrays in place ("@a = sort @a") is now optimized to avoid
848       making a temporary copy of the array.
849
850       Likewise, "reverse sort ..." is now optimized to sort in reverse,
851       avoiding the generation of a temporary intermediate list.
852
853   Lexical array access
854       Access to elements of lexical arrays via a numeric constant between 0
855       and 255 is now faster. (This used to be only the case for global
856       arrays.)
857
858   XS-assisted SWASHGET
859       Some pure-perl code that perl was using to retrieve Unicode properties
860       and transliteration mappings has been reimplemented in XS.
861
862   Constant subroutines
863       The interpreter internals now support a far more memory efficient form
864       of inlineable constants. Storing a reference to a constant value in a
865       symbol table is equivalent to a full typeglob referencing a constant
866       subroutine, but using about 400 bytes less memory. This proxy constant
867       subroutine is automatically upgraded to a real typeglob with subroutine
868       if necessary.  The approach taken is analogous to the existing space
869       optimisation for subroutine stub declarations, which are stored as
870       plain scalars in place of the full typeglob.
871
872       Several of the core modules have been converted to use this feature for
873       their system dependent constants - as a result "use POSIX;" now takes
874       about 200K less memory.
875
876   "PERL_DONT_CREATE_GVSV"
877       The new compilation flag "PERL_DONT_CREATE_GVSV", introduced as an
878       option in perl 5.8.8, is turned on by default in perl 5.9.3. It
879       prevents perl from creating an empty scalar with every new typeglob.
880       See perl589delta for details.
881
882   Weak references are cheaper
883       Weak reference creation is now O(1) rather than O(n), courtesy of
884       Nicholas Clark. Weak reference deletion remains O(n), but if deletion
885       only happens at program exit, it may be skipped completely.
886
887   sort() enhancements
888       Salvador Fandin~o provided improvements to reduce the memory usage of
889       "sort" and to speed up some cases.
890
891   Memory optimisations
892       Several internal data structures (typeglobs, GVs, CVs, formats) have
893       been restructured to use less memory. (Nicholas Clark)
894
895   UTF-8 cache optimisation
896       The UTF-8 caching code is now more efficient, and used more often.
897       (Nicholas Clark)
898
899   Sloppy stat on Windows
900       On Windows, perl's stat() function normally opens the file to determine
901       the link count and update attributes that may have been changed through
902       hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up
903       stat() by not performing this operation. (Jan Dubois)
904
905   Regular expressions optimisations
906       Engine de-recursivised
907           The regular expression engine is no longer recursive, meaning that
908           patterns that used to overflow the stack will either die with
909           useful explanations, or run to completion, which, since they were
910           able to blow the stack before, will likely take a very long time to
911           happen. If you were experiencing the occasional stack overflow (or
912           segfault) and upgrade to discover that now perl apparently hangs
913           instead, look for a degenerate regex. (Dave Mitchell)
914
915       Single char char-classes treated as literals
916           Classes of a single character are now treated the same as if the
917           character had been used as a literal, meaning that code that uses
918           char-classes as an escaping mechanism will see a speedup. (Yves
919           Orton)
920
921       Trie optimisation of literal string alternations
922           Alternations, where possible, are optimised into more efficient
923           matching structures. String literal alternations are merged into a
924           trie and are matched simultaneously.  This means that instead of
925           O(N) time for matching N alternations at a given point, the new
926           code performs in O(1) time.  A new special variable,
927           ${^RE_TRIE_MAXBUF}, has been added to fine-tune this optimization.
928           (Yves Orton)
929
930           Note: Much code exists that works around perl's historic poor
931           performance on alternations. Often the tricks used to do so will
932           disable the new optimisations. Hopefully the utility modules used
933           for this purpose will be educated about these new optimisations.
934
935       Aho-Corasick start-point optimisation
936           When a pattern starts with a trie-able alternation and there aren't
937           better optimisations available, the regex engine will use Aho-
938           Corasick matching to find the start point. (Yves Orton)
939

Installation and Configuration Improvements

941   Configuration improvements
942       "-Dusesitecustomize"
943           Run-time customization of @INC can be enabled by passing the
944           "-Dusesitecustomize" flag to Configure. When enabled, this will
945           make perl run $sitelibexp/sitecustomize.pl before anything else.
946           This script can then be set up to add additional entries to @INC.
947
948       Relocatable installations
949           There is now Configure support for creating a relocatable perl
950           tree. If you Configure with "-Duserelocatableinc", then the paths
951           in @INC (and everything else in %Config) can be optionally located
952           via the path of the perl executable.
953
954           That means that, if the string ".../" is found at the start of any
955           path, it's substituted with the directory of $^X. So, the
956           relocation can be configured on a per-directory basis, although the
957           default with "-Duserelocatableinc" is that everything is relocated.
958           The initial install is done to the original configured prefix.
959
960       strlcat() and strlcpy()
961           The configuration process now detects whether strlcat() and
962           strlcpy() are available.  When they are not available, perl's own
963           version is used (from Russ Allbery's public domain implementation).
964           Various places in the perl interpreter now use them. (Steve Peters)
965
966       "d_pseudofork" and "d_printf_format_null"
967           A new configuration variable, available as $Config{d_pseudofork} in
968           the Config module, has been added, to distinguish real fork()
969           support from fake pseudofork used on Windows platforms.
970
971           A new configuration variable, "d_printf_format_null", has been
972           added, to see if printf-like formats are allowed to be NULL.
973
974       Configure help
975           "Configure -h" has been extended with the most commonly used
976           options.
977
978   Compilation improvements
979       Parallel build
980           Parallel makes should work properly now, although there may still
981           be problems if "make test" is instructed to run in parallel.
982
983       Borland's compilers support
984           Building with Borland's compilers on Win32 should work more
985           smoothly. In particular Steve Hay has worked to side step many
986           warnings emitted by their compilers and at least one C compiler
987           internal error.
988
989       Static build on Windows
990           Perl extensions on Windows now can be statically built into the
991           Perl DLL.
992
993           Also, it's now possible to build a "perl-static.exe" that doesn't
994           depend on the Perl DLL on Win32. See the Win32 makefiles for
995           details.  (Vadim Konovalov)
996
997       ppport.h files
998           All ppport.h files in the XS modules bundled with perl are now
999           autogenerated at build time. (Marcus Holland-Moritz)
1000
1001       C++ compatibility
1002           Efforts have been made to make perl and the core XS modules
1003           compilable with various C++ compilers (although the situation is
1004           not perfect with some of the compilers on some of the platforms
1005           tested.)
1006
1007       Support for Microsoft 64-bit compiler
1008           Support for building perl with Microsoft's 64-bit compiler has been
1009           improved. (ActiveState)
1010
1011       Visual C++
1012           Perl can now be compiled with Microsoft Visual C++ 2005 (and 2008
1013           Beta 2).
1014
1015       Win32 builds
1016           All win32 builds (MS-Win, WinCE) have been merged and cleaned up.
1017
1018   Installation improvements
1019       Module auxiliary files
1020           README files and changelogs for CPAN modules bundled with perl are
1021           no longer installed.
1022
1023   New Or Improved Platforms
1024       Perl has been reported to work on Symbian OS. See perlsymbian for more
1025       information.
1026
1027       Many improvements have been made towards making Perl work correctly on
1028       z/OS.
1029
1030       Perl has been reported to work on DragonFlyBSD and MidnightBSD.
1031
1032       Perl has also been reported to work on NexentaOS (
1033       http://www.gnusolaris.org/ ).
1034
1035       The VMS port has been improved. See perlvms.
1036
1037       Support for Cray XT4 Catamount/Qk has been added. See
1038       hints/catamount.sh in the source code distribution for more
1039       information.
1040
1041       Vendor patches have been merged for RedHat and Gentoo.
1042
1043       DynaLoader::dl_unload_file() now works on Windows.
1044

Selected Bug Fixes

1046       strictures in regexp-eval blocks
1047           "strict" wasn't in effect in regexp-eval blocks ("/(?{...})/").
1048
1049       Calling CORE::require()
1050           CORE::require() and CORE::do() were always parsed as require() and
1051           do() when they were overridden. This is now fixed.
1052
1053       Subscripts of slices
1054           You can now use a non-arrowed form for chained subscripts after a
1055           list slice, like in:
1056
1057               ({foo => "bar"})[0]{foo}
1058
1059           This used to be a syntax error; a "->" was required.
1060
1061       "no warnings 'category'" works correctly with -w
1062           Previously when running with warnings enabled globally via "-w",
1063           selective disabling of specific warning categories would actually
1064           turn off all warnings.  This is now fixed; now "no warnings 'io';"
1065           will only turn off warnings in the "io" class. Previously it would
1066           erroneously turn off all warnings.
1067
1068       threads improvements
1069           Several memory leaks in ithreads were closed. Also, ithreads were
1070           made less memory-intensive.
1071
1072           "threads" is now a dual-life module, also available on CPAN. It has
1073           been expanded in many ways. A kill() method is available for thread
1074           signalling.  One can get thread status, or the list of running or
1075           joinable threads.
1076
1077           A new "threads->exit()" method is used to exit from the application
1078           (this is the default for the main thread) or from the current
1079           thread only (this is the default for all other threads). On the
1080           other hand, the exit() built-in now always causes the whole
1081           application to terminate. (Jerry D. Hedden)
1082
1083       chr() and negative values
1084           chr() on a negative value now gives "\x{FFFD}", the Unicode
1085           replacement character, unless when the "bytes" pragma is in effect,
1086           where the low eight bits of the value are used.
1087
1088       PERL5SHELL and tainting
1089           On Windows, the PERL5SHELL environment variable is now checked for
1090           taintedness. (Rafael Garcia-Suarez)
1091
1092       Using *FILE{IO}
1093           "stat()" and "-X" filetests now treat *FILE{IO} filehandles like
1094           *FILE filehandles. (Steve Peters)
1095
1096       Overloading and reblessing
1097           Overloading now works when references are reblessed into another
1098           class.  Internally, this has been implemented by moving the flag
1099           for "overloading" from the reference to the referent, which
1100           logically is where it should always have been. (Nicholas Clark)
1101
1102       Overloading and UTF-8
1103           A few bugs related to UTF-8 handling with objects that have
1104           stringification overloaded have been fixed. (Nicholas Clark)
1105
1106       eval memory leaks fixed
1107           Traditionally, "eval 'syntax error'" has leaked badly. Many (but
1108           not all) of these leaks have now been eliminated or reduced. (Dave
1109           Mitchell)
1110
1111       Random device on Windows
1112           In previous versions, perl would read the file /dev/urandom if it
1113           existed when seeding its random number generator.  That file is
1114           unlikely to exist on Windows, and if it did would probably not
1115           contain appropriate data, so perl no longer tries to read it on
1116           Windows. (Alex Davies)
1117
1118       PERLIO_DEBUG
1119           The "PERLIO_DEBUG" environment variable no longer has any effect
1120           for setuid scripts and for scripts run with -T.
1121
1122           Moreover, with a thread-enabled perl, using "PERLIO_DEBUG" could
1123           lead to an internal buffer overflow. This has been fixed.
1124
1125       PerlIO::scalar and read-only scalars
1126           PerlIO::scalar will now prevent writing to read-only scalars.
1127           Moreover, seek() is now supported with PerlIO::scalar-based
1128           filehandles, the underlying string being zero-filled as needed.
1129           (Rafael, Jarkko Hietaniemi)
1130
1131       study() and UTF-8
1132           study() never worked for UTF-8 strings, but could lead to false
1133           results.  It's now a no-op on UTF-8 data. (Yves Orton)
1134
1135       Critical signals
1136           The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in
1137           an "unsafe" manner (contrary to other signals, that are deferred
1138           until the perl interpreter reaches a reasonably stable state; see
1139           "Deferred Signals (Safe Signals)" in perlipc). (Rafael)
1140
1141       @INC-hook fix
1142           When a module or a file is loaded through an @INC-hook, and when
1143           this hook has set a filename entry in %INC, __FILE__ is now set for
1144           this module accordingly to the contents of that %INC entry.
1145           (Rafael)
1146
1147       "-t" switch fix
1148           The "-w" and "-t" switches can now be used together without messing
1149           up which categories of warnings are activated. (Rafael)
1150
1151       Duping UTF-8 filehandles
1152           Duping a filehandle which has the ":utf8" PerlIO layer set will now
1153           properly carry that layer on the duped filehandle. (Rafael)
1154
1155       Localisation of hash elements
1156           Localizing a hash element whose key was given as a variable didn't
1157           work correctly if the variable was changed while the local() was in
1158           effect (as in "local $h{$x}; ++$x"). (Bo Lindbergh)
1159

New or Changed Diagnostics

1161       Use of uninitialized value
1162           Perl will now try to tell you the name of the variable (if any)
1163           that was undefined.
1164
1165       Deprecated use of my() in false conditional
1166           A new deprecation warning, Deprecated use of my() in false
1167           conditional, has been added, to warn against the use of the dubious
1168           and deprecated construct
1169
1170               my $x if 0;
1171
1172           See perldiag. Use "state" variables instead.
1173
1174       !=~ should be !~
1175           A new warning, "!=~ should be !~", is emitted to prevent this
1176           misspelling of the non-matching operator.
1177
1178       Newline in left-justified string
1179           The warning Newline in left-justified string has been removed.
1180
1181       Too late for "-T" option
1182           The error Too late for "-T" option has been reformulated to be more
1183           descriptive.
1184
1185       "%s" variable %s masks earlier declaration
1186           This warning is now emitted in more consistent cases; in short,
1187           when one of the declarations involved is a "my" variable:
1188
1189               my $x;   my $x;     # warns
1190               my $x;  our $x;     # warns
1191               our $x;  my $x;     # warns
1192
1193           On the other hand, the following:
1194
1195               our $x; our $x;
1196
1197           now gives a ""our" variable %s redeclared" warning.
1198
1199       readdir()/closedir()/etc. attempted on invalid dirhandle
1200           These new warnings are now emitted when a dirhandle is used but is
1201           either closed or not really a dirhandle.
1202
1203       Opening dirhandle/filehandle %s also as a file/directory
1204           Two deprecation warnings have been added: (Rafael)
1205
1206               Opening dirhandle %s also as a file
1207               Opening filehandle %s also as a directory
1208
1209       Use of -P is deprecated
1210           Perl's command-line switch "-P" is now deprecated.
1211
1212       v-string in use/require is non-portable
1213           Perl will warn you against potential backwards compatibility
1214           problems with the "use VERSION" syntax.
1215
1216       perl -V
1217           "perl -V" has several improvements, making it more useable from
1218           shell scripts to get the value of configuration variables. See
1219           perlrun for details.
1220

Changed Internals

1222       In general, the source code of perl has been refactored, tidied up, and
1223       optimized in many places. Also, memory management and allocation has
1224       been improved in several points.
1225
1226       When compiling the perl core with gcc, as many gcc warning flags are
1227       turned on as is possible on the platform.  (This quest for cleanliness
1228       doesn't extend to XS code because we cannot guarantee the tidiness of
1229       code we didn't write.)  Similar strictness flags have been added or
1230       tightened for various other C compilers.
1231
1232   Reordering of SVt_* constants
1233       The relative ordering of constants that define the various types of
1234       "SV" have changed; in particular, "SVt_PVGV" has been moved before
1235       "SVt_PVLV", "SVt_PVAV", "SVt_PVHV" and "SVt_PVCV".  This is unlikely to
1236       make any difference unless you have code that explicitly makes
1237       assumptions about that ordering. (The inheritance hierarchy of "B::*"
1238       objects has been changed to reflect this.)
1239
1240   Elimination of SVt_PVBM
1241       Related to this, the internal type "SVt_PVBM" has been been removed.
1242       This dedicated type of "SV" was used by the "index" operator and parts
1243       of the regexp engine to facilitate fast Boyer-Moore matches. Its use
1244       internally has been replaced by "SV"s of type "SVt_PVGV".
1245
1246   New type SVt_BIND
1247       A new type "SVt_BIND" has been added, in readiness for the project to
1248       implement Perl 6 on 5. There deliberately is no implementation yet, and
1249       they cannot yet be created or destroyed.
1250
1251   Removal of CPP symbols
1252       The C preprocessor symbols "PERL_PM_APIVERSION" and
1253       "PERL_XS_APIVERSION", which were supposed to give the version number of
1254       the oldest perl binary-compatible (resp. source-compatible) with the
1255       present one, were not used, and sometimes had misleading values. They
1256       have been removed.
1257
1258   Less space is used by ops
1259       The "BASEOP" structure now uses less space. The "op_seq" field has been
1260       removed and replaced by a single bit bit-field "op_opt". "op_type" is
1261       now 9 bits long. (Consequently, the "B::OP" class doesn't provide an
1262       "seq" method anymore.)
1263
1264   New parser
1265       perl's parser is now generated by bison (it used to be generated by
1266       byacc.) As a result, it seems to be a bit more robust.
1267
1268       Also, Dave Mitchell improved the lexer debugging output under "-DT".
1269
1270   Use of "const"
1271       Andy Lester supplied many improvements to determine which function
1272       parameters and local variables could actually be declared "const" to
1273       the C compiler. Steve Peters provided new *_set macros and reworked the
1274       core to use these rather than assigning to macros in LVALUE context.
1275
1276   Mathoms
1277       A new file, mathoms.c, has been added. It contains functions that are
1278       no longer used in the perl core, but that remain available for binary
1279       or source compatibility reasons. However, those functions will not be
1280       compiled in if you add "-DNO_MATHOMS" in the compiler flags.
1281
1282   "AvFLAGS" has been removed
1283       The "AvFLAGS" macro has been removed.
1284
1285   "av_*" changes
1286       The "av_*()" functions, used to manipulate arrays, no longer accept
1287       null "AV*" parameters.
1288
1289   $^H and %^H
1290       The implementation of the special variables $^H and %^H has changed, to
1291       allow implementing lexical pragmas in pure Perl.
1292
1293   B:: modules inheritance changed
1294       The inheritance hierarchy of "B::" modules has changed; "B::NV" now
1295       inherits from "B::SV" (it used to inherit from "B::IV").
1296
1297   Anonymous hash and array constructors
1298       The anonymous hash and array constructors now take 1 op in the optree
1299       instead of 3, now that pp_anonhash and pp_anonlist return a reference
1300       to an hash/array when the op is flagged with OPf_SPECIAL. (Nicholas
1301       Clark)
1302

Known Problems

1304       There's still a remaining problem in the implementation of the lexical
1305       $_: it doesn't work inside "/(?{...})/" blocks. (See the TODO test in
1306       t/op/mydef.t.)
1307
1308       Stacked filetest operators won't work when the "filetest" pragma is in
1309       effect, because they rely on the stat() buffer "_" being populated, and
1310       filetest bypasses stat().
1311
1312   UTF-8 problems
1313       The handling of Unicode still is unclean in several places, where it's
1314       dependent on whether a string is internally flagged as UTF-8. This will
1315       be made more consistent in perl 5.12, but that won't be possible
1316       without a certain amount of backwards incompatibility.
1317

Platform Specific Problems

1319       When compiled with g++ and thread support on Linux, it's reported that
1320       the $! stops working correctly. This is related to the fact that the
1321       glibc provides two strerror_r(3) implementation, and perl selects the
1322       wrong one.
1323

Reporting Bugs

1325       If you find what you think is a bug, you might check the articles
1326       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
1327       database at http://rt.perl.org/rt3/ .  There may also be information at
1328       http://www.perl.org/ , the Perl Home Page.
1329
1330       If you believe you have an unreported bug, please run the perlbug
1331       program included with your release.  Be sure to trim your bug down to a
1332       tiny but sufficient test case.  Your bug report, along with the output
1333       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
1334       the Perl porting team.
1335

SEE ALSO

1337       The Changes file and the perl590delta to perl595delta man pages for
1338       exhaustive details on what changed.
1339
1340       The INSTALL file for how to build Perl.
1341
1342       The README file for general stuff.
1343
1344       The Artistic and Copying files for copyright information.
1345
1346
1347
1348perl v5.10.1                      2009-08-11                  PERL5100DELTA(1)
Impressum