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       Optional pre-match and post-match captures with the /p flag
195           There is a new flag "/p" for regular expressions.  Using this makes
196           the engine preserve a copy of the part of the matched string before
197           the matching substring to the new special variable "${^PREMATCH}",
198           the part after the matching substring to "${^POSTMATCH}", and the
199           matched substring itself to "${^MATCH}".
200
201           Perl is still able to store these substrings to the special
202           variables "$`", "$'", $&, but using these variables anywhere in the
203           program adds a penalty to all regular expression matches, whereas
204           if you use the "/p" flag and the new special variables instead, you
205           pay only for the regular expressions where the flag is used.
206
207           For more detail on the new variables, see perlvar; for the use of
208           the regular expression flag, see perlop and perlre.
209
210   "say()"
211       say() is a new built-in, only available when "use feature 'say'" is in
212       effect, that is similar to print(), but that implicitly appends a
213       newline to the printed string. See "say" in perlfunc. (Robin Houston)
214
215   Lexical $_
216       The default variable $_ can now be lexicalized, by declaring it like
217       any other lexical variable, with a simple
218
219           my $_;
220
221       The operations that default on $_ will use the lexically-scoped version
222       of $_ when it exists, instead of the global $_.
223
224       In a "map" or a "grep" block, if $_ was previously my'ed, then the $_
225       inside the block is lexical as well (and scoped to the block).
226
227       In a scope where $_ has been lexicalized, you can still have access to
228       the global version of $_ by using $::_, or, more simply, by overriding
229       the lexical declaration with "our $_". (Rafael Garcia-Suarez)
230
231   The "_" prototype
232       A new prototype character has been added. "_" is equivalent to "$" but
233       defaults to $_ if the corresponding argument isn't supplied (both "$"
234       and "_" denote a scalar). Due to the optional nature of the argument,
235       you can only use it at the end of a prototype, or before a semicolon.
236
237       This has a small incompatible consequence: the prototype() function has
238       been adjusted to return "_" for some built-ins in appropriate cases
239       (for example, "prototype('CORE::rmdir')"). (Rafael Garcia-Suarez)
240
241   UNITCHECK blocks
242       "UNITCHECK", a new special code block has been introduced, in addition
243       to "BEGIN", "CHECK", "INIT" and "END".
244
245       "CHECK" and "INIT" blocks, while useful for some specialized purposes,
246       are always executed at the transition between the compilation and the
247       execution of the main program, and thus are useless whenever code is
248       loaded at runtime. On the other hand, "UNITCHECK" blocks are executed
249       just after the unit which defined them has been compiled. See perlmod
250       for more information. (Alex Gough)
251
252   New Pragma, "mro"
253       A new pragma, "mro" (for Method Resolution Order) has been added. It
254       permits to switch, on a per-class basis, the algorithm that perl uses
255       to find inherited methods in case of a multiple inheritance hierarchy.
256       The default MRO hasn't changed (DFS, for Depth First Search). Another
257       MRO is available: the C3 algorithm. See mro for more information.
258       (Brandon Black)
259
260       Note that, due to changes in the implementation of class hierarchy
261       search, code that used to undef the *ISA glob will most probably break.
262       Anyway, undef'ing *ISA had the side-effect of removing the magic on the
263       @ISA array and should not have been done in the first place. Also, the
264       cache *::ISA::CACHE:: no longer exists; to force reset the @ISA cache,
265       you now need to use the "mro" API, or more simply to assign to @ISA
266       (e.g. with "@ISA = @ISA").
267
268   readdir() may return a "short filename" on Windows
269       The readdir() function may return a "short filename" when the long
270       filename contains characters outside the ANSI codepage.  Similarly
271       Cwd::cwd() may return a short directory name, and glob() may return
272       short names as well.  On the NTFS file system these short names can
273       always be represented in the ANSI codepage.  This will not be true for
274       all other file system drivers; e.g. the FAT filesystem stores short
275       filenames in the OEM codepage, so some files on FAT volumes remain
276       unaccessible through the ANSI APIs.
277
278       Similarly, $^X, @INC, and $ENV{PATH} are preprocessed at startup to
279       make sure all paths are valid in the ANSI codepage (if possible).
280
281       The Win32::GetLongPathName() function now returns the UTF-8 encoded
282       correct long file name instead of using replacement characters to force
283       the name into the ANSI codepage.  The new Win32::GetANSIPathName()
284       function can be used to turn a long pathname into a short one only if
285       the long one cannot be represented in the ANSI codepage.
286
287       Many other functions in the "Win32" module have been improved to accept
288       UTF-8 encoded arguments.  Please see Win32 for details.
289
290   readpipe() is now overridable
291       The built-in function readpipe() is now overridable. Overriding it
292       permits also to override its operator counterpart, "qx//" (a.k.a.
293       "``").  Moreover, it now defaults to $_ if no argument is provided.
294       (Rafael Garcia-Suarez)
295
296   Default argument for readline()
297       readline() now defaults to *ARGV if no argument is provided. (Rafael
298       Garcia-Suarez)
299
300   state() variables
301       A new class of variables has been introduced. State variables are
302       similar to "my" variables, but are declared with the "state" keyword in
303       place of "my". They're visible only in their lexical scope, but their
304       value is persistent: unlike "my" variables, they're not undefined at
305       scope entry, but retain their previous value. (Rafael Garcia-Suarez,
306       Nicholas Clark)
307
308       To use state variables, one needs to enable them by using
309
310           use feature 'state';
311
312       or by using the "-E" command-line switch in one-liners.  See
313       "Persistent Private Variables" in perlsub.
314
315   Stacked filetest operators
316       As a new form of syntactic sugar, it's now possible to stack up
317       filetest operators. You can now write "-f -w -x $file" in a row to mean
318       "-x $file && -w _ && -f _". See "-X" in perlfunc.
319
320   UNIVERSAL::DOES()
321       The "UNIVERSAL" class has a new method, "DOES()". It has been added to
322       solve semantic problems with the "isa()" method. "isa()" checks for
323       inheritance, while "DOES()" has been designed to be overridden when
324       module authors use other types of relations between classes (in
325       addition to inheritance). (chromatic)
326
327       See "$obj->DOES( ROLE )" in UNIVERSAL.
328
329   Formats
330       Formats were improved in several ways. A new field, "^*", can be used
331       for variable-width, one-line-at-a-time text. Null characters are now
332       handled correctly in picture lines. Using "@#" and "~~" together will
333       now produce a compile-time error, as those format fields are
334       incompatible.  perlform has been improved, and miscellaneous bugs
335       fixed.
336
337   Byte-order modifiers for pack() and unpack()
338       There are two new byte-order modifiers, ">" (big-endian) and "<"
339       (little-endian), that can be appended to most pack() and unpack()
340       template characters and groups to force a certain byte-order for that
341       type or group.  See "pack" in perlfunc and perlpacktut for details.
342
343   "no VERSION"
344       You can now use "no" followed by a version number to specify that you
345       want to use a version of perl older than the specified one.
346
347   "chdir", "chmod" and "chown" on filehandles
348       "chdir", "chmod" and "chown" can now work on filehandles as well as
349       filenames, if the system supports respectively "fchdir", "fchmod" and
350       "fchown", thanks to a patch provided by Gisle Aas.
351
352   OS groups
353       $( and $) now return groups in the order where the OS returns them,
354       thanks to Gisle Aas. This wasn't previously the case.
355
356   Recursive sort subs
357       You can now use recursive subroutines with sort(), thanks to Robin
358       Houston.
359
360   Exceptions in constant folding
361       The constant folding routine is now wrapped in an exception handler,
362       and if folding throws an exception (such as attempting to evaluate
363       0/0), perl now retains the current optree, rather than aborting the
364       whole program.  Without this change, programs would not compile if they
365       had expressions that happened to generate exceptions, even though those
366       expressions were in code that could never be reached at runtime.
367       (Nicholas Clark, Dave Mitchell)
368
369   Source filters in @INC
370       It's possible to enhance the mechanism of subroutine hooks in @INC by
371       adding a source filter on top of the filehandle opened and returned by
372       the hook. This feature was planned a long time ago, but wasn't quite
373       working until now. See "require" in perlfunc for details. (Nicholas
374       Clark)
375
376   New internal variables
377       "${^RE_DEBUG_FLAGS}"
378           This variable controls what debug flags are in effect for the
379           regular expression engine when running under "use re "debug"". See
380           re for details.
381
382       "${^CHILD_ERROR_NATIVE}"
383           This variable gives the native status returned by the last pipe
384           close, backtick command, successful call to wait() or waitpid(), or
385           from the system() operator. See perlvar for details. (Contributed
386           by Gisle Aas.)
387
388       "${^RE_TRIE_MAXBUF}"
389           See "Trie optimisation of literal string alternations".
390
391       "${^WIN32_SLOPPY_STAT}"
392           See "Sloppy stat on Windows".
393
394   Miscellaneous
395       "unpack()" now defaults to unpacking the $_ variable.
396
397       "mkdir()" without arguments now defaults to $_.
398
399       The internal dump output has been improved, so that non-printable
400       characters such as newline and backspace are output in "\x" notation,
401       rather than octal.
402
403       The -C option can no longer be used on the "#!" line. It wasn't working
404       there anyway, since the standard streams are already set up at this
405       point in the execution of the perl interpreter. You can use binmode()
406       instead to get the desired behaviour.
407
408   UCD 5.0.0
409       The copy of the Unicode Character Database included in Perl 5 has been
410       updated to version 5.0.0.
411
412   MAD
413       MAD, which stands for Miscellaneous Attribute Decoration, is a still-
414       in-development work leading to a Perl 5 to Perl 6 converter. To enable
415       it, it's necessary to pass the argument "-Dmad" to Configure. The
416       obtained perl isn't binary compatible with a regular perl 5.10, and has
417       space and speed penalties; moreover not all regression tests still pass
418       with it. (Larry Wall, Nicholas Clark)
419
420   kill() on Windows
421       On Windows platforms, "kill(-9, $pid)" now kills a process tree.  (On
422       Unix, this delivers the signal to all processes in the same process
423       group.)
424

Incompatible Changes

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

Modules and Pragmata

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

Utility Changes

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

New Documentation

853       The perlpragma manpage documents how to write one's own lexical pragmas
854       in pure Perl (something that is possible starting with 5.9.4).
855
856       The new perlglossary manpage is a glossary of terms used in the Perl
857       documentation, technical and otherwise, kindly provided by O'Reilly
858       Media, Inc.
859
860       The perlreguts manpage, courtesy of Yves Orton, describes internals of
861       the Perl regular expression engine.
862
863       The perlreapi manpage describes the interface to the perl interpreter
864       used to write pluggable regular expression engines (by AEvar Arnfjoerd`
865       Bjarmason).
866
867       The perlunitut manpage is a tutorial for programming with Unicode and
868       string encodings in Perl, courtesy of Juerd Waalboer.
869
870       A new manual page, perlunifaq (the Perl Unicode FAQ), has been added
871       (Juerd Waalboer).
872
873       The perlcommunity manpage gives a description of the Perl community on
874       the Internet and in real life. (Edgar "Trizor" Bering)
875
876       The CORE manual page documents the "CORE::" namespace. (Tels)
877
878       The long-existing feature of "/(?{...})/" regexps setting $_ and pos()
879       is now documented.
880

Performance Enhancements

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

Installation and Configuration Improvements

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

Selected Bug Fixes

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

New or Changed Diagnostics

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

Changed Internals

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

Known Problems

1340       There's still a remaining problem in the implementation of the lexical
1341       $_: it doesn't work inside "/(?{...})/" blocks. (See the TODO test in
1342       t/op/mydef.t.)
1343
1344       Stacked filetest operators won't work when the "filetest" pragma is in
1345       effect, because they rely on the stat() buffer "_" being populated, and
1346       filetest bypasses stat().
1347
1348   UTF-8 problems
1349       The handling of Unicode still is unclean in several places, where it's
1350       dependent on whether a string is internally flagged as UTF-8. This will
1351       be made more consistent in perl 5.12, but that won't be possible
1352       without a certain amount of backwards incompatibility.
1353

Platform Specific Problems

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

Reporting Bugs

1361       If you find what you think is a bug, you might check the articles
1362       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
1363       database at http://rt.perl.org/rt3/ .  There may also be information at
1364       http://www.perl.org/ , the Perl Home Page.
1365
1366       If you believe you have an unreported bug, please run the perlbug
1367       program included with your release.  Be sure to trim your bug down to a
1368       tiny but sufficient test case.  Your bug report, along with the output
1369       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
1370       the Perl porting team.
1371

SEE ALSO

1373       The Changes file and the perl590delta to perl595delta man pages for
1374       exhaustive details on what changed.
1375
1376       The INSTALL file for how to build Perl.
1377
1378       The README file for general stuff.
1379
1380       The Artistic and Copying files for copyright information.
1381
1382
1383
1384perl v5.32.1                      2021-03-31                  PERL5100DELTA(1)
Impressum