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
575   warnings::enabled and warnings::warnif changed to favor users of modules
576       The behaviour in 5.10.x favors the person using the module; The
577       behaviour in 5.8.x favors the module writer;
578
579       Assume the following code:
580
581         main calls Foo::Bar::baz()
582         Foo::Bar inherits from Foo::Base
583         Foo::Bar::baz() calls Foo::Base::_bazbaz()
584         Foo::Base::_bazbaz() calls: warnings::warnif('substr', 'some warning
585       message');
586
587       On 5.8.x, the code warns when Foo::Bar contains "use warnings;" It does
588       not matter if Foo::Base or main have warnings enabled to disable the
589       warning one has to modify Foo::Bar.
590
591       On 5.10.0 and newer, the code warns when main contains "use warnings;"
592       It does not matter if Foo::Base or Foo::Bar have warnings enabled to
593       disable the warning one has to modify main.
594

Modules and Pragmata

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

Utility Changes

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

New Documentation

837       The perlpragma manpage documents how to write one's own lexical pragmas
838       in pure Perl (something that is possible starting with 5.9.4).
839
840       The new perlglossary manpage is a glossary of terms used in the Perl
841       documentation, technical and otherwise, kindly provided by O'Reilly
842       Media, Inc.
843
844       The perlreguts manpage, courtesy of Yves Orton, describes internals of
845       the Perl regular expression engine.
846
847       The perlreapi manpage describes the interface to the perl interpreter
848       used to write pluggable regular expression engines (by var Arnfjoerd`
849       Bjarmason).
850
851       The perlunitut manpage is an tutorial for programming with Unicode and
852       string encodings in Perl, courtesy of Juerd Waalboer.
853
854       A new manual page, perlunifaq (the Perl Unicode FAQ), has been added
855       (Juerd Waalboer).
856
857       The perlcommunity manpage gives a description of the Perl community on
858       the Internet and in real life. (Edgar "Trizor" Bering)
859
860       The CORE manual page documents the "CORE::" namespace. (Tels)
861
862       The long-existing feature of "/(?{...})/" regexps setting $_ and pos()
863       is now documented.
864

Performance Enhancements

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

Installation and Configuration Improvements

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

Selected Bug Fixes

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

New or Changed Diagnostics

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

Changed Internals

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

Known Problems

1324       There's still a remaining problem in the implementation of the lexical
1325       $_: it doesn't work inside "/(?{...})/" blocks. (See the TODO test in
1326       t/op/mydef.t.)
1327
1328       Stacked filetest operators won't work when the "filetest" pragma is in
1329       effect, because they rely on the stat() buffer "_" being populated, and
1330       filetest bypasses stat().
1331
1332   UTF-8 problems
1333       The handling of Unicode still is unclean in several places, where it's
1334       dependent on whether a string is internally flagged as UTF-8. This will
1335       be made more consistent in perl 5.12, but that won't be possible
1336       without a certain amount of backwards incompatibility.
1337

Platform Specific Problems

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

Reporting Bugs

1345       If you find what you think is a bug, you might check the articles
1346       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
1347       database at http://rt.perl.org/rt3/ .  There may also be information at
1348       http://www.perl.org/ , the Perl Home Page.
1349
1350       If you believe you have an unreported bug, please run the perlbug
1351       program included with your release.  Be sure to trim your bug down to a
1352       tiny but sufficient test case.  Your bug report, along with the output
1353       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
1354       the Perl porting team.
1355

SEE ALSO

1357       The Changes file and the perl590delta to perl595delta man pages for
1358       exhaustive details on what changed.
1359
1360       The INSTALL file for how to build Perl.
1361
1362       The README file for general stuff.
1363
1364       The Artistic and Copying files for copyright information.
1365
1366
1367
1368perl v5.16.3                      2013-03-04                  PERL5100DELTA(1)
Impressum