Penguin
Blame: perldelta(1)
EditPageHistoryDiffInfoLikePages
Annotated edit history of perldelta(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLDELTA
2 !!!PERLDELTA
3 NAME
4 DESCRIPTION
5 Summary of changes between 5.6.0 and 5.6.1
6 Core Enhancements
7 Modules and Pragmata
8 Utility Changes
9 Improved Documentation
10 Performance enhancements
11 Installation and Configuration Improvements
12 Platform specific changes
13 Significant bug fixes
14 New or Changed Diagnostics
15 New tests
16 Incompatible Changes
17 Known Problems
18 Obsolete Diagnostics
19 Reporting Bugs
20 SEE ALSO
21 HISTORY
22 ----
23 !!NAME
24
25
26 perldelta - what's new for perl v5.6.x
27 !!DESCRIPTION
28
29
30 This document describes differences between the 5.005
31 release and the 5.6.1 release.
32 !!Summary of changes between 5.6.0 and 5.6.1
33
34
35 This section contains a summary of the changes between the
36 5.6.0 release and the 5.6.1 release. More details about the
37 changes mentioned here may be found in the ''Changes''
38 files that accompany the Perl source distribution. See
39 perlhack for pointers to online resources where you can
40 inspect the individual patches described by these
41 changes.
42
43
44 __Security Issues__
45
46
47 suidperl will not run /bin/mail anymore, because some
48 platforms have a /bin/mail that is vulnerable to buffer
49 overflow attacks.
50
51
52 Note that suidperl is neither built nor installed by default
53 in any recent version of perl. Use of suidperl is highly
54 discouraged. If you think you need it, try alternatives such
55 as sudo first. See
56 http://www.courtesan.com/sudo/.
57
58
59 __Core bug fixes__
60
61
62 This is not an exhaustive list. It is intended to cover only
63 the significant user-visible changes.
64
65
66 UNIVERSAL::isa()
67
68
69 A bug in the caching mechanism used by
70 UNIVERSAL::isa() that affected base.pm has been
71 fixed. The bug has existed since the 5.005 releases, but
72 wasn't tickled by base.pm in those releases.
73
74
75 Memory leaks
76
77
78 Various cases of memory leaks and attempts to access
79 uninitialized memory have been cured. See ``Known Problems''
80 below for further issues.
81
82
83 Numeric conversions
84
85
86 Numeric conversions did not recognize changes in the string
87 value properly in certain circumstances.
88
89
90 In other situations, large unsigned numbers (those above
91 2**31) could sometimes lose their unsignedness, causing
92 bogus results in arithmetic operations.
93
94
95 Integer modulus on large unsigned integers sometimes
96 returned incorrect values.
97
98
99 Perl 5.6.0 generated ``not a number'' warnings on certain
100 conversions where previous versions didn't.
101
102
103 These problems have all been rectified.
104
105
106 Infinity is now recognized as a number.
107
108
109 qw(a\b)
110
111
112 In Perl 5.6.0, qw(a\b) produced a string with two
113 backslashes instead of one, in a departure from the behavior
114 in previous versions. The older behavior has been
115 reinstated.
116
117
118 ''caller()''
119
120
121 ''caller()'' could cause core dumps in certain
122 situations. Carp was sometimes affected by this
123 problem.
124
125
126 Bugs in regular expressions
127
128
129 Pattern matches on overloaded values are now handled
130 correctly.
131
132
133 Perl 5.6.0 parsed m/x{ab}/ incorrectly, leading to spurious
134 warnings. This has been corrected.
135
136
137 The RE engine found in Perl 5.6.0
138 accidentally pessimised certain kinds of simple pattern
139 matches. These are now handled better.
140
141
142 Regular expression debug output (whether through use re
143 'debug' or via -Dr) now looks
144 better.
145
146
147 Multi-line matches like
148 were flawed. The bug has been
149 fixed.
150
151
152 Use of $
153
154
155 Match variables $1 et al., weren't being unset when
156 a pattern match was backtracking, and the anomaly showed up
157 inside /...(?{ ... }).../ etc. These variables are
158 now tracked correctly.
159
160
161 ''pos()'' did not return the correct value within s///ge
162 in earlier versions. This is now handled
163 correctly.
164
165
166 ``slurp'' mode
167
168
169 ''readline()'' on files opened in ``slurp'' mode could
170 return an extra
171 ''
172
173
174 Autovivification of symbolic references to special
175 variables
176
177
178 Autovivification of symbolic references of special variables
179 described in perlvar (as in ${$num}) was
180 accidentally disabled. This works again now.
181
182
183 Lexical warnings
184
185
186 Lexical warnings now propagate correctly into eval
187 .
188
189
190 use warnings qw(FATAL all) did not work as
191 intended. This has been corrected.
192
193
194 Lexical warnings could leak into other scopes in some
195 situations. This is now fixed.
196
197
198 ''warnings::enabled()'' now reports the state of $^W
199 correctly if the caller isn't using lexical
200 warnings.
201
202
203 Spurious warnings and errors
204
205
206 Perl 5.6.0 could emit spurious warnings about redefinition
207 of ''dl_error()'' when statically building extensions
208 into perl. This has been corrected.
209
210
211 ``our'' variables could result in bogus ``Variable will not
212 stay shared'' warnings. This is now fixed.
213
214
215 ``our'' variables of the same name declared in two sibling
216 blocks resulted in bogus warnings about ``redeclaration'' of
217 the variables. The problem has been corrected.
218
219
220 ''glob()''
221
222
223 Compatibility of the builtin ''glob()'' with old
224 csh-based glob has been improved with the addition of
225 GLOB_ALPHASORT option. See
226 File::Glob.
227
228
229 ''File::Glob::glob()'' has been renamed to
230 ''File::Glob::bsd_glob()'' because the name clashes with
231 the builtin ''glob()''. The older name is still available
232 for compatibility, but is deprecated.
233
234
235 Spurious syntax errors generated in certain situations, when
236 ''glob()'' caused File::Glob to be loaded for the first
237 time, have been fixed.
238
239
240 Tainting
241
242
243 Some cases of inconsistent taint propagation (such as within
244 hash values) have been fixed.
245
246
247 The tainting behavior of ''sprintf()'' has been
248 rationalized. It does not taint the result of floating point
249 formats anymore, making the behavior consistent with that of
250 string interpolation.
251
252
253 ''sort()''
254
255
256 Arguments to ''sort()'' weren't being provided the right
257 ''wantarray()'' context. The comparison block is now run
258 in scalar context, and the arguments to be sorted are always
259 provided list context.
260
261
262 ''sort()'' is also fully reentrant, in the sense that the
263 sort function can itself call ''sort()''. This did not
264 work reliably in previous releases.
265
266
267 #line directives
268
269
270 #line directives now work correctly when they appear at the
271 very beginning of eval
272 .
273
274
275 Subroutine prototypes
276
277
278 The (
279
280
281 ''map()''
282
283
284 ''map()'' could get pathologically slow when the result
285 list it generates is larger than the source list. The
286 performance has been improved for common
287 scenarios.
288
289
290 Debugger
291
292
293 Debugger exit code now reflects the script exit
294 code.
295
296
297 Condition in breakpoints is now
298 treated correctly.
299
300
301 The d command now checks the line
302 number.
303
304
305 $. is no longer corrupted by the
306 debugger.
307
308
309 All debugger output now correctly goes to the socket if
2 perry 310 !RemotePort is set.
1 perry 311
312
313 PERL5OPT
314
315
316 PERL5OPT can be set to more than one switch
317 group. Previously, it used to be limited to one group of
318 options only.
319
320
321 ''chop()''
322
323
324 chop(@list) in list context returned the characters chopped
325 in reverse order. This has been reversed to be in the right
326 order.
327
328
329 Unicode support
330
331
332 Unicode support has seen a large number of incremental
333 improvements, but continues to be highly experimental. It is
334 not expected to be fully supported in the 5.6.x maintenance
335 releases.
336
337
338 ''substr()'', ''join()'', ''repeat()'',
339 ''reverse()'', ''quotemeta()'' and string
340 concatenation were all handling Unicode strings incorrectly
341 in Perl 5.6.0. This has been corrected.
342
343
344 Support for tr///CU and tr///UC etc., have
345 been removed since we realized the interface is broken. For
346 similar functionality, see ``pack'' in
347 perlfunc.
348
349
350 The Unicode Character Database has been updated to version
351 3.0.1 with additions made available to the public as of
352 August 30, 2000.
353
354
2 perry 355 The Unicode character classes p{Blank} and p{!SpacePerl} have
1 perry 356 been added. ``Blank'' is like C ''isblank()'', that is,
357 it contains only ``horizontal whitespace'' (the space
2 perry 358 character is, the newline isn't), and the ``!SpacePerl'' is
1 perry 359 the Unicode equivalent of s (p{Space} isn't, since
360 that includes the vertical tabulator character, whereas
361 s doesn't.)
362
363
364 If you are experimenting with Unicode support in perl, the
365 development versions of Perl may have more to offer. In
366 particular, I/O layers are now available in the development
367 track, but not in the maintenance track, primarily to do
368 backward compatibility issues. Unicode support is also
369 evolving rapidly on a daily basis in the development
370 track--the maintenance track only reflects the most
371 conservative of these changes.
372
373
374 64-bit support
375
376
377 Support for 64-bit platforms has been improved, but
378 continues to be experimental. The level of support varies
379 greatly among platforms.
380
381
382 Compiler
383
384
385 The B Compiler and its various backends have had many
386 incremental improvements, but they continue to remain highly
387 experimental. Use in production environments is
388 discouraged.
389
390
391 The perlcc tool has been rewritten so that the user
392 interface is much more like that of a C
393 compiler.
394
395
396 The perlbc tools has been removed. Use perlcc -B
397 instead.
398
399
400 Lvalue subroutines
401
402
403 There have been various bugfixes to support lvalue
404 subroutines better. However, the feature still remains
405 experimental.
406
407
408 IO::Socket
409
410
411 IO::Socket::INET failed to open the specified port if the
412 service name was not known. It now correctly uses the
413 supplied port number as is.
414
415
416 File::Find
417
418
419 File::Find now ''chdir()''s correctly when chasing
420 symbolic links.
421
422
423 xsubpp
424
425
426 xsubpp now tolerates embedded POD
427 sections.
428
429
430 no Module;
431
432
433 no Module; does not produce an error even if Module
434 does not have an ''unimport()'' method. This parallels
435 the behavior of use vis-a-vis
436 import.
437
438
439 Tests
440
441
442 A large number of tests have been added.
443
444
445 __Core features__
446
447
448 ''untie()'' will now call an ''UNTIE
449 ()'' hook if it exists. See perltie for
450 details.
451
452
453 The -DT command line switch outputs copious
454 tokenizing information. See perlrun.
455
456
457 Arrays are now always interpolated in double-quotish
458 strings. Previously, used
459 to be a fatal error at compile time, if an array
460 @bar was not used or declared. This transitional
461 behavior was intended to help migrate perl4 code, and is
462 deemed to be no longer useful. See ``Arrays now always
463 interpolate into double-quoted strings''.
464
465
466 ''keys()'', ''each()'', ''pop()'', ''push()'',
467 ''shift()'', ''splice()'' and ''unshift()'' can all
468 be overridden now.
469
470
471 my __PACKAGE__ $obj now does the expected
472 thing.
473
474
475 __Configuration issues__
476
477
478 On some systems ( IRIX and Solaris among
479 them) the system malloc is demonstrably better. While the
480 defaults haven't been changed in order to retain binary
481 compatibility with earlier releases, you may be better off
482 building perl with Configure -Uusemymalloc ... as
483 discussed in the ''INSTALL''
484 file.
485
486
487 Configure has been enhanced in various
488 ways:
489
490
491 Minimizes use of temporary files.
492
493
494 By default, does not link perl with libraries not used by
495 it, such as the various dbm libraries. SunOS 4.x hints
496 preserve behavior on that platform.
497
498
499 Support for pdp11-style memory models has been removed due
500 to obsolescence.
501
502
503 Building outside the source tree is supported on systems
504 that have symbolic links. This is done by
505 running
506
507
508 sh /path/to/source/Configure -Dmksymlinks ...
509 make all test install
510 in a directory other than the perl source directory. See ''INSTALL'' .
511
512
513 Configure -S can be run
514 non-interactively.
515
516
517 __Documentation__
518
519
520 README .aix, README .solaris
521 and README .macos have been added.
522 README .posix-bc has been renamed to
523 README .bs2000. These are installed as
524 perlaix, perlsolaris, perlmacos, and perlbs2000
525 respectively.
526
527
528 The following pod documents are brand new:
529
530
531 perlclib Internal replacements for standard C library functions
532 perldebtut Perl debugging tutorial
533 perlebcdic Considerations for running Perl on EBCDIC platforms
534 perlnewmod Perl modules: preparing a new module for distribution
535 perlrequick Perl regular expressions quick start
536 perlretut Perl regular expressions tutorial
537 perlutil utilities packaged with the Perl distribution
538 The ''INSTALL'' file has been expanded to cover various issues, such as 64-bit support.
539
540
541 A longer list of contributors has been added to the source
542 distribution. See the file AUTHORS.
543
544
545 Numerous other changes have been made to the included
546 documentation and FAQs.
547
548
549 __Bundled modules__
550
551
552 The following modules have been added.
553
554
555 B::Concise
556
557
558 Walks Perl syntax tree, printing concise info about ops. See
559 B::Concise.
560
561
562 File::Temp
563
564
565 Returns name and handle of a temporary file safely. See
566 File::Temp.
567
568
569 Pod::LaTeX
570
571
572 Converts Pod data to formatted LaTeX. See
573 Pod::LaTeX.
574
575
576 Pod::Text::Overstrike
577
578
579 Converts POD data to formatted overstrike
580 text. See Pod::Text::Overstrike.
581
582
583 The following modules have been upgraded.
584
585
586 CGI
587
588
589 CGI v2.752 is now included.
590
591
592 CPAN
593
594
595 CPAN v1.59_54 is now included.
596
597
598 Class::Struct
599
600
601 Various bugfixes have been added.
602
603
604 DB_File
605
606
607 DB_File v1.75 supports newer Berkeley DB
608 versions, among other improvements.
609
610
611 Devel::Peek
612
613
614 Devel::Peek has been enhanced to support dumping of memory
615 statistics, when perl is built with the included
616 ''malloc()''.
617
618
619 File::Find
620
621
622 File::Find now supports pre and post-processing of the files
623 in order to ''sort()'' them, etc.
624
625
626 Getopt::Long
627
628
629 Getopt::Long v2.25 is included.
630
631
632 IO::Poll
633
634
635 Various bug fixes have been included.
636
637
638 IPC::Open3
639
640
641 IPC::Open3 allows use of numeric file
642 descriptors.
643
644
2 perry 645 Math::!BigFloat
1 perry 646
647
648 The ''fmod()'' function supports modulus operations.
649 Various bug fixes have also been included.
650
651
652 Math::Complex
653
654
655 Math::Complex handles inf, NaN etc., better.
656
657
658 Net::Ping
659
660
661 ''ping()'' could fail on odd number of data bytes, and
662 when the echo service isn't running. This has been
663 corrected.
664
665
666 Opcode
667
668
669 A memory leak has been fixed.
670
671
672 Pod::Parser
673
674
675 Version 1.13 of the Pod::Parser suite is
676 included.
677
678
679 Pod::Text
680
681
682 Pod::Text and related modules have been upgraded to the
683 versions in podlators suite v2.08.
684
685
686 SDBM_File
687
688
689 On dosish platforms, some keys went missing because of lack
690 of support for files with ``holes''. A workaround for the
691 problem has been added.
692
693
694 Sys::Syslog
695
696
697 Various bug fixes have been included.
698
699
2 perry 700 Tie::!RefHash
1 perry 701
702
2 perry 703 Now supports Tie::!RefHash::Nestable to automagically tie
1 perry 704 hashref values.
705
706
2 perry 707 Tie::!SubstrHash
1 perry 708
709
710 Various bug fixes have been included.
711
712
713 __Platform-specific improvements__
714
715
716 The following new ports are now available.
717
718
719 NCR MP-RAS
720
721
2 perry 722 !NonStop-UX
1 perry 723
724
725 Perl now builds under Amdahl UTS
726 .
727
728
729 Perl has also been verified to build under Amiga
730 OS .
731
732
733 Support for EPOC has been much improved. See
734 README .epoc.
735
736
737 Building perl with -Duseithreads or -Duse5005threads now
738 works under HP-UX 10.20 (previously it only worked under
739 10.30 or later). You will need a thread library package
740 installed. See README .hpux.
741
742
743 Long doubles should now work under Linux.
744
745
746 MacOS Classic is now supported in the mainstream source
747 package. See README .macos.
748
749
750 Support for MPE/iX has been updated. See
751 README .mpeix.
752
753
754 Support for OS/2 has been improved. See
755 os2/Changes and README
756 .os2.
757
758
759 Dynamic loading on z/OS (formerly OS/390 )
760 has been improved. See README
761 .os390.
762
763
764 Support for VMS has seen many incremental
765 improvements, including better support for operators like
766 backticks and ''system()'', and better %ENV
767 handling. See README.vms and perlvms.
768
769
770 Support for Stratus VOS has been improved.
771 See vos/Changes and README
772 .vos.
773
774
775 Support for Windows has been improved.
776
777
778 ''fork()'' emulation has been improved in various ways,
779 but still continues to be experimental. See perlfork for
780 known bugs and caveats.
781
782
783 %SIG has been enabled under USE_ITHREADS ,
784 but its use is completely unsupported under all
785 configurations.
786
787
788 Borland C ++ v5.5 is now a supported compiler
789 that can build Perl. However, the generated binaries
790 continue to be incompatible with those generated by the
791 other supported compilers ( GCC and Visual C
792 ++ ).
793
794
795 Non-blocking waits for child processes (or pseudo-processes)
796 are supported via waitpid($pid,
797 .
798
799
800 A memory leak in ''accept()'' has been
801 fixed.
802
803
804 ''wait()'', ''waitpid()'' and backticks now return the
805 correct exit status under Windows 9x.
806
807
808 Trailing new %ENV entries weren't propagated to
809 child processes. This is now fixed.
810
811
812 Current directory entries in %ENV are now correctly
813 propagated to child processes.
814
815
816 Duping socket handles with open(F, ``
817
818
819 The makefiles now provide a single switch to bulk-enable all
2 perry 820 the features enabled in !ActiveState !ActivePerl (a popular
1 perry 821 binary distribution).
822
823
2 perry 824 ''Win32::!GetCwd()'' correctly returns C:\ instead of C:
1 perry 825 when at the drive root. Other bugs in ''chdir()'' and
826 ''Cwd::cwd()'' have also been fixed.
827
828
829 ''fork()'' correctly returns undef and sets
830 EAGAIN when it runs out of pseudo-process
831 handles.
832
833
2 perry 834 !ExtUtils::!MakeMaker now uses $ENV{
1 perry 835 LIB } to search for libraries.
836
837
838 UNC path handling is better when perl is
839 built to support ''fork()''.
840
841
842 A handle leak in socket handling has been
843 fixed.
844
845
846 ''send()'' works from within a
847 pseudo-process.
848
849
850 Unless specifically qualified otherwise, the remainder of
851 this document covers changes between the 5.005 and 5.6.0
852 releases.
853 !!Core Enhancements
854
855
856 __Interpreter cloning, threads, and
857 concurrency__
858
859
860 Perl 5.6.0 introduces the beginnings of support for running
861 multiple interpreters concurrently in different threads. In
862 conjunction with the ''perl_clone()'' API
863 call, which can be used to selectively duplicate the state
864 of any given interpreter, it is possible to compile a piece
865 of code once in an interpreter, clone that interpreter one
866 or more times, and run all the resulting interpreters in
867 distinct threads.
868
869
870 On the Windows platform, this feature is used to emulate
871 ''fork()'' at the interpreter level. See perlfork for
872 details about that.
873
874
875 This feature is still in evolution. It is eventually meant
876 to be used to selectively clone a subroutine and data
877 reachable from that subroutine in a separate interpreter and
878 run the cloned subroutine in a separate thread. Since there
879 is no shared data between the interpreters, little or no
880 locking will be needed (unless parts of the symbol table are
881 explicitly shared). This is obviously intended to be an
882 easy-to-use replacement for the existing threads
883 support.
884
885
886 Support for cloning interpreters and interpreter concurrency
887 can be enabled using the -Dusethreads Configure option (see
888 win32/Makefile for how to enable it on Windows.) The
889 resulting perl executable will be functionally identical to
890 one that was built with -Dmultiplicity, but the
891 ''perl_clone()'' API call will only be
892 available in the former.
893
894
895 -Dusethreads enables the cpp macro
896 USE_ITHREADS by default, which in turn
897 enables Perl source code changes that provide a clear
898 separation between the op tree and the data it operates
899 with. The former is immutable, and can therefore be shared
900 between an interpreter and all of its clones, while the
901 latter is considered local to each interpreter, and is
902 therefore copied for each clone.
903
904
905 Note that building Perl with the -Dusemultiplicity Configure
906 option is adequate if you wish to run multiple
907 __independent__ interpreters concurrently in different
908 threads. -Dusethreads only provides the additional
909 functionality of the ''perl_clone()'' API
910 call and other support for running __cloned__
911 interpreters concurrently.
912
913
914 NOTE: This is an experimental feature. Implementation details are
915 subject to change.
916
917
918 __Lexically scoped warning categories__
919
920
921 You can now control the granularity of warnings emitted by
922 perl at a finer level using the use warnings
923 pragma. warnings and perllexwarn have copious documentation
924 on this feature.
925
926
927 __Unicode and UTF-8 support__
928
929
930 Perl now uses UTF-8 as its internal
931 representation for character strings. The utf8 and
932 bytes pragmas are used to control this support in
933 the current lexical scope. See perlunicode, utf8 and bytes
934 for more information.
935
936
937 This feature is expected to evolve quickly to support some
938 form of I/O disciplines that can be used to specify the kind
939 of input and output data (bytes or characters). Until that
940 happens, additional modules from CPAN will be
941 needed to complete the toolkit for dealing with
942 Unicode.
943
944
945 NOTE: This should be considered an experimental feature. Implementation
946 details are subject to change.
947
948
949 __Support for interpolating named
950 characters__
951
952
953 The new N escape interpolates named characters
954 within strings. For example,
955 evaluates to a string with a Unicode smiley
956 face at the end.
957
958
959 __``our'' declarations__
960
961
962 An ``our'' declaration introduces a value that can be best
963 understood as a lexically scoped symbolic alias to a global
964 variable in the package that was current where the variable
965 was declared. This is mostly useful as an alternative to the
966 vars pragma, but also provides the opportunity to
967 introduce typing and other attributes for such variables.
968 See ``our'' in perlfunc.
969
970
971 __Support for strings represented as a vector of
972 ordinals__
973
974
975 Literals of the form v1.2.3.4 are now parsed as a
976 string composed of characters with the specified ordinals.
977 This is an alternative, more readable way to construct
978 (possibly Unicode) strings instead of interpolating
979 characters, as in . The
980 leading v may be omitted if there are more than two
981 ordinals, so 1.2.3 is parsed the same as
982 v1.2.3.
983
984
985 Strings written in this form are also useful to represent
986 version ``numbers''. It is easy to compare such version
987 ``numbers'' (which are really just plain strings) using any
988 of the usual string comparison operators eq,
989 ne, lt, gt, etc., or perform
990 bitwise string operations on them using , ,
991 etc.
992
993
994 In conjunction with the new $^V magic variable
995 (which contains the perl version as a string), such literals
996 can be used as a readable way to check if you're running a
997 particular version of Perl:
998
999
1000 # this will parse in older versions of Perl also
1001 if ($^V and $^V gt v5.6.0) {
1002 # new features supported
1003 }
1004 require and use also have some special magic to support such literals. They will be interpreted as a version rather than as a module name:
1005
1006
1007 require v5.6.0; # croak if $^V lt v5.6.0
1008 use v5.6.0; # same, but croaks at compile-time
1009 Alternatively, the v may be omitted if there is more than one dot:
1010
1011
1012 require 5.6.0;
1013 use 5.6.0;
1014 Also, sprintf and printf support the Perl-specific format flag %v to print ordinals of characters in arbitrary strings:
1015
1016
1017 printf
1018 See ``Scalar value constructors'' in perldata for additional information.
1019
1020
1021 __Improved Perl version numbering system__
1022
1023
1024 Beginning with Perl version 5.6.0, the version number
1025 convention has been changed to a ``dotted integer'' scheme
1026 that is more commonly found in open source
1027 projects.
1028
1029
1030 Maintenance versions of v5.6.0 will be released as v5.6.1,
1031 v5.6.2 etc. The next development series following v5.6.0
1032 will be numbered v5.7.x, beginning with v5.7.0, and the next
1033 major production release following v5.6.0 will be
1034 v5.8.0.
1035
1036
1037 The English module now sets $PERL_VERSION to $^V (a
1038 string value) rather than $] (a numeric value).
1039 (This is a potential incompatibility. Send us a report via
1040 perlbug if you are affected by this.)
1041
1042
1043 The v1.2.3 syntax is also now legal in Perl. See ``Support
1044 for strings represented as a vector of ordinals'' for more
1045 on that.
1046
1047
1048 To cope with the new versioning system's use of at least
1049 three significant digits for each version component, the
1050 method used for incrementing the subversion number has also
1051 changed slightly. We assume that versions older than v5.6.0
1052 have been incrementing the subversion component in multiples
1053 of 10. Versions after v5.6.0 will increment them by 1. Thus,
1054 using the new notation, 5.005_03 is the ``same'' as v5.5.30,
1055 and the first maintenance version following v5.6.0 will be
1056 v5.6.1 (which should be read as being equivalent to a
1057 floating point value of 5.006_001 in the older format,
1058 stored in $]).
1059
1060
1061 __New syntax for declaring subroutine
1062 attributes__
1063
1064
1065 Formerly, if you wanted to mark a subroutine as being a
1066 method call or as requiring an automatic ''lock()'' when
1067 it is entered, you had to declare that with a use
1068 attrs pragma in the body of the subroutine. That can
1069 now be accomplished with declaration syntax, like
1070 this:
1071
1072
1073 sub mymethod : locked method ;
1074 ...
1075 sub mymethod : locked method {
1076 ...
1077 }
1078 sub othermethod :locked :method ;
1079 ...
1080 sub othermethod :locked :method {
1081 ...
1082 }
1083 (Note how only the first : is mandatory, and whitespace surrounding the : is optional.)
1084
1085
2 perry 1086 ''!AutoSplit.pm'' and ''!SelfLoader.pm'' have been
1 perry 1087 updated to keep the attributes with the stubs they provide.
1088 See attributes.
1089
1090
1091 __File and directory handles can be
1092 autovivified__
1093
1094
1095 Similar to how constructs such as $x-
1096 autovivify a reference, handle constructors (''open()'',
1097 ''opendir()'', ''pipe()'', ''socketpair()'',
1098 ''sysopen()'', ''socket()'', and ''accept()'') now
1099 autovivify a file or directory handle if the handle passed
1100 to them is an uninitialized scalar variable. This allows the
1101 constructs such as open(my $fh, ...) and
1102 open(local $fh,...) to be used to create
1103 filehandles that will conveniently be closed automatically
1104 when the scope ends, provided there are no other references
1105 to them. This largely eliminates the need for typeglobs when
1106 opening filehandles that must be passed around, as in the
1107 following example:
1108
1109
1110 sub myopen {
1111 open my $fh,
1112 {
1113 my $f = myopen(
1114
1115
1116 ''open()'' __with more than two
1117 arguments__
1118
1119
1120 If ''open()'' is passed three arguments instead of two,
1121 the second argument is used as the mode and the third
1122 argument is taken to be the file name. This is primarily
1123 useful for protecting against unintended magic behavior of
1124 the traditional two-argument form. See ``open'' in
1125 perlfunc.
1126
1127
1128 __64-bit support__
1129
1130
1131 Any platform that has 64-bit integers either
1132
1133
1134 (1) natively as longs or ints
1135 (2) via special compiler flags
1136 (3) using long long or int64_t
1137 is able to use ``quads'' (64-bit integers) as follows:
1138
1139
1140 constants (decimal, hexadecimal, octal, binary) in the
1141 code
1142
1143
1144 arguments to ''oct()'' and ''hex()''
1145
1146
1147 arguments to ''print()'', ''printf()'' and
1148 ''sprintf()'' (flag prefixes ll, L, q)
1149
1150
1151 printed as such
1152
1153
1154 ''pack()'' and ''unpack()'' ``q'' and ``Q''
1155 formats
1156
1157
1158 in basic arithmetics: + - * / % ( NOTE:
1159 operating close to the limits of the integer values may
1160 produce surprising results)
1161
1162
1163 in bit arithmetics:
1164 NOTE: these used to be forced to be 32 bits
1165 wide but now operate on the full native width.)
1166
1167
1168 ''vec()''
1169
1170
1171 Note that unless you have the case (a) you will have to
1172 configure and compile Perl using the -Duse64bitint Configure
1173 flag.
1174
1175
1176 NOTE: The Configure flags -Duselonglong and -Duse64bits have been
1177 deprecated. Use -Duse64bitint instead.
1178 There are actually two modes of 64-bitness: the first one is achieved using Configure -Duse64bitint and the second one using Configure -Duse64bitall. The difference is that the first one is minimal and the second one maximal. The first works in more places than the second.
1179
1180
1181 The use64bitint does only as much as is required to
1182 get 64-bit integers into Perl (this may mean, for example,
1183 using ``long longs'') while your memory may still be limited
1184 to 2 gigabytes (because your pointers could still be
1185 32-bit). Note that the name 64bitint does not imply
1186 that your C compiler will be using 64-bit ints (it
1187 might, but it doesn't have to): the use64bitint
1188 means that you will be able to have 64 bits wide scalar
1189 values.
1190
1191
1192 The use64bitall goes all the way by attempting to
1193 switch also integers (if it can), longs (and pointers) to
1194 being 64-bit. This may create an even more binary
1195 incompatible Perl than -Duse64bitint: the resulting
1196 executable may not run at all in a 32-bit box, or you may
1197 have to reboot/reconfigure/rebuild your operating system to
1198 be 64-bit aware.
1199
1200
1201 Natively 64-bit systems like Alpha and Cray need neither
1202 -Duse64bitint nor -Duse64bitall.
1203
1204
1205 Last but not least: note that due to Perl's habit of always
1206 using floating point numbers, the quads are still not true
1207 integers. When quads overflow their limits
1208 (0...18_446_744_073_709_551_615 unsigned,
1209 -9_223_372_036_854_775_808...9_223_372_036_854_775_807
1210 signed), they are silently promoted to floating point
1211 numbers, after which they will start losing precision (in
1212 their lower digits).
1213
1214
1215 NOTE: 64-bit support is still experimental on most platforms.
1216 Existing support only covers the LP64 data model. In particular, the
1217 LLP64 data model is not yet supported. 64-bit libraries and system
1218 APIs on many platforms have not stabilized--your mileage may vary.
1219
1220
1221 __Large file support__
1222
1223
1224 If you have filesystems that support ``large files'' (files
1225 larger than 2 gigabytes), you may now also be able to create
1226 and access them from Perl.
1227
1228
1229 NOTE: The default action is to enable large file support, if
1230 available on the platform.
1231 If the large file support is on, and you have a Fcntl constant O_LARGEFILE, the O_LARGEFILE is automatically added to the flags of ''sysopen()''.
1232
1233
1234 Beware that unless your filesystem also supports ``sparse
1235 files'' seeking to umpteen petabytes may be
1236 inadvisable.
1237
1238
1239 Note that in addition to requiring a proper file system to
1240 do large files you may also need to adjust your per-process
1241 (or your per-system, or per-process-group, or
1242 per-user-group) maximum filesize limits before running Perl
1243 scripts that try to handle large files, especially if you
1244 intend to write such files.
1245
1246
1247 Finally, in addition to your process/process group maximum
1248 filesize limits, you may have quota limits on your
1249 filesystems that stop you (your user id or your user group
1250 id) from using large files.
1251
1252
1253 Adjusting your process/user/group/file system/operating
1254 system limits is outside the scope of Perl core language.
1255 For process limits, you may try increasing the limits using
1256 your shell's limits/limit/ulimit command before running
1257 Perl. The BSD::Resource extension (not included with the
1258 standard Perl distribution) may also be of use, it offers
1259 the getrlimit/setrlimit interface that can be used to adjust
1260 process resource usage limits, including the maximum
1261 filesize limit.
1262
1263
1264 __Long doubles__
1265
1266
1267 In some systems you may be able to use long doubles to
1268 enhance the range and precision of your double precision
1269 floating point numbers (that is, Perl's numbers). Use
1270 Configure -Duselongdouble to enable this support (if it is
1271 available).
1272
1273
1274 __``more bits''__
1275
1276
1277 You can ``Configure -Dusemorebits'' to turn on both the
1278 64-bit support and the long double support.
1279
1280
1281 __Enhanced support for__ ''sort()''
1282 __subroutines__
1283
1284
1285 Perl subroutines with a prototype of ($$), and
1286 XSUBs in general, can now be used as sort subroutines. In
1287 either case, the two elements to be compared are passed as
1288 normal parameters in @_. See ``sort'' in
1289 perlfunc.
1290
1291
1292 For unprototyped sort subroutines, the historical behavior
1293 of passing the elements to be compared as the global
1294 variables $a and $b remains
1295 unchanged.
1296
1297
1298 sort $coderef @foo __allowed__
1299
1300
1301 ''sort()'' did not accept a subroutine reference as the
1302 comparison function in earlier versions. This is now
1303 permitted.
1304
1305
1306 __File globbing implemented internally__
1307
1308
1309 Perl now uses the File::Glob implementation of the
1310 ''glob()'' operator automatically. This avoids using an
1311 external csh process and the problems associated with
1312 it.
1313
1314
1315 NOTE: This is currently an experimental feature. Interfaces and
1316 implementation are subject to change.
1317
1318
1319 __Support for CHECK blocks__
1320
1321
1322 In addition to BEGIN, INIT, END,
1323 DESTROY and AUTOLOAD, subroutines named
1324 CHECK are now special. These are queued up during
1325 compilation and behave similar to END blocks,
1326 except they are called at the end of compilation rather than
1327 at the end of execution. They cannot be called
1328 directly.
1329
1330
1331 __POSIX character class syntax [[: :]
1332 supported__
1333
1334
1335 For example to match alphabetic characters use
1336 /[[[[:alpha:]]/. See perlre for details.
1337
1338
1339 __Better pseudo-random number generator__
1340
1341
1342 In 5.005_0x and earlier, perl's ''rand()'' function used
1343 the C library rand(3) function. As of 5.005_52,
1344 Configure tests for ''drand48()'', ''random()'', and
1345 ''rand()'' (in that order) and picks the first one it
1346 finds.
1347
1348
1349 These changes should result in better random numbers from
1350 ''rand()''.
1351
1352
1353 __Improved__ qw// __operator__
1354
1355
1356 The qw// operator is now evaluated at compile time
1357 into a true list instead of being replaced with a run time
1358 call to split(). This removes the confusing
1359 misbehaviour of qw// in scalar context, which had
1360 inherited that behaviour from ''split()''.
1361
1362
1363 Thus:
1364
1365
1366 $foo = ($bar) = qw(a b c); print
1367 now correctly prints ``3a'', instead of ``2a''.
1368
1369
1370 __Better worst-case behavior of hashes__
1371
1372
1373 Small changes in the hashing algorithm have been implemented
1374 in order to improve the distribution of lower order bits in
1375 the hashed value. This is expected to yield better
1376 performance on keys that are repeated
1377 sequences.
1378
1379
1380 ''pack()'' __format 'Z' supported__
1381
1382
1383 The new format type 'Z' is useful for packing and unpacking
1384 null-terminated strings. See ``pack'' in
1385 perlfunc.
1386
1387
1388 ''pack()'' __format modifier '!'
1389 supported__
1390
1391
1392 The new format type modifier '!' is useful for packing and
1393 unpacking native shorts, ints, and longs. See ``pack'' in
1394 perlfunc.
1395
1396
1397 ''pack()'' __and__ ''unpack()'' __support counted
1398 strings__
1399
1400
1401 The template character '/' can be used to specify a counted
1402 string type to be packed or unpacked. See ``pack'' in
1403 perlfunc.
1404
1405
1406 __Comments in__ ''pack()''
1407 __templates__
1408
1409
1410 The '#' character in a template introduces a comment up to
1411 end of the line. This facilitates documentation of
1412 ''pack()'' templates.
1413
1414
1415 __Weak references__
1416
1417
1418 In previous versions of Perl, you couldn't cache objects so
1419 as to allow them to be deleted if the last reference from
1420 outside the cache is deleted. The reference in the cache
1421 would hold a reference count on the object and the objects
1422 would never be destroyed.
1423
1424
1425 Another familiar problem is with circular references. When
1426 an object references itself, its reference count would never
1427 go down to zero, and it would not get destroyed until the
1428 program is about to exit.
1429
1430
1431 Weak references solve this by allowing you to ``weaken'' any
1432 reference, that is, make it not count towards the reference
1433 count. When the last non-weak reference to an object is
1434 deleted, the object is destroyed and all the weak references
1435 to the object are automatically undef-ed.
1436
1437
2 perry 1438 To use this feature, you need the !WeakRef package from
1 perry 1439 CPAN , which contains additional
1440 documentation.
1441
1442
1443 NOTE: This is an experimental feature. Details are subject to change.
1444
1445
1446 __Binary numbers supported__
1447
1448
1449 Binary numbers are now supported as literals, in s?printf
1450 formats, and oct():
1451
1452
1453 $answer = 0b101010;
1454 printf
1455
1456
1457 __Lvalue subroutines__
1458
1459
1460 Subroutines can now return modifiable lvalues. See ``Lvalue
1461 subroutines'' in perlsub.
1462
1463
1464 NOTE: This is an experimental feature. Details are subject to change.
1465
1466
1467 __Some arrows may be omitted in calls through
1468 references__
1469
1470
1471 Perl now allows the arrow to be omitted in many constructs
1472 involving subroutine calls through references. For example,
1473 $foo[[10]- may now be written
1474 $foo[[10]('foo'). This is rather similar to how the
1475 arrow may be omitted from $foo[[10]-.
1476 Note however, that the arrow is still required for
1477 foo(10)-.
1478
1479
1480 __Boolean assignment operators are legal
1481 lvalues__
1482
1483
1484 Constructs such as ($a = 2) += 1 are now
1485 allowed.
1486
1487
1488 ''exists()'' __is supported on subroutine
1489 names__
1490
1491
1492 The ''exists()'' builtin now works on subroutine names. A
1493 subroutine is considered to exist if it has been declared
1494 (even if implicitly). See ``exists'' in perlfunc for
1495 examples.
1496
1497
1498 ''exists()'' __and__ ''delete()'' __are supported
1499 on array elements__
1500
1501
1502 The ''exists()'' and ''delete()'' builtins now work on
1503 simple arrays as well. The behavior is similar to that on
1504 hash elements.
1505
1506
1507 ''exists()'' can be used to check whether an array
1508 element has been initialized. This avoids autovivifying
1509 array elements that don't exist. If the array is tied, the
1510 ''EXISTS ()'' method in the corresponding
1511 tied package will be invoked.
1512
1513
1514 ''delete()'' may be used to remove an element from the
1515 array and return it. The array element at that position
1516 returns to its uninitialized state, so that testing for the
1517 same element with ''exists()'' will return false. If the
1518 element happens to be the one at the end, the size of the
1519 array also shrinks up to the highest element that tests true
1520 for ''exists()'', or 0 if none such is found. If the
1521 array is tied, the ''DELETE ()'' method in
1522 the corresponding tied package will be invoked.
1523
1524
1525 See ``exists'' in perlfunc and ``delete'' in perlfunc for
1526 examples.
1527
1528
1529 __Pseudo-hashes work better__
1530
1531
1532 Dereferencing some types of reference values in a
1533 pseudo-hash, such as $ph-, was
1534 accidentally disallowed. This has been
1535 corrected.
1536
1537
1538 When applied to a pseudo-hash element, ''exists()'' now
1539 reports whether the specified value exists, not merely if
1540 the key is valid.
1541
1542
1543 ''delete()'' now works on pseudo-hashes. When given a
1544 pseudo-hash element or slice it deletes the values
1545 corresponding to the keys (but not the keys themselves). See
1546 ``Pseudo-hashes: Using an array as a hash'' in
1547 perlref.
1548
1549
1550 Pseudo-hash slices with constant keys are now optimized to
1551 array lookups at compile-time.
1552
1553
1554 List assignments to pseudo-hash slices are now
1555 supported.
1556
1557
1558 The fields pragma now provides ways to create
1559 pseudo-hashes, via ''fields::new()'' and
1560 ''fields::phash()''. See fields.
1561
1562
1563 NOTE: The pseudo-hash data type continues to be experimental.
1564 Limiting oneself to the interface elements provided by the
1565 fields pragma will provide protection from any future changes.
1566
1567
1568 __Automatic flushing of output buffers__
1569
1570
1571 ''fork()'', ''exec()'', ''system()'', qx//, and
1572 pipe ''open()''s now flush buffers of all files opened
1573 for output when the operation was attempted. This mostly
1574 eliminates confusing buffering mishaps suffered by users
1575 unaware of how Perl internally handles I/O.
1576
1577
1578 This is not supported on some platforms like Solaris where a
1579 suitably correct implementation of fflush(
1580 NULL ) isn't available.
1581
1582
1583 __Better diagnostics on meaningless filehandle
1584 operations__
1585
1586
1587 Constructs such as open( and
1588 close( are compile time errors.
1589 Attempting to read from filehandles that were opened only
1590 for writing will now produce warnings (just as writing to
1591 read-only filehandles does).
1592
1593
1594 __Where possible, buffered data discarded from duped input
1595 filehandle__
1596
1597
1598 open(NEW, now attempts to
1599 discard any data that was previously read and buffered in
1600 OLD before duping the handle. On platforms where
1601 doing this is allowed, the next read operation on
1602 NEW will return the same data as the corresponding
1603 operation on OLD. Formerly, it would have returned
1604 the data from the start of the following disk block
1605 instead.
1606
1607
1608 ''eof()'' __has the same old magic as
1609 __
1610
1611
1612 eof() would return true if no attempt to read from
1613 had yet been made. eof() has been
1614 changed to have a little magic of its own, it now opens the
1615 files.
1616
1617
1618 ''binmode()'' __can be used to set :crlf and :raw
1619 modes__
1620
1621
1622 ''binmode()'' now accepts a second argument that
1623 specifies a discipline for the handle in question. The two
1624 pseudo-disciplines ``:raw'' and ``:crlf'' are currently
1625 supported on DOS-derivative platforms. See ``binmode'' in
1626 perlfunc and open.
1627
1628
1629 -T __filetest recognizes UTF-8
1630 encoded files as ``text''__
1631
1632
1633 The algorithm used for the -T filetest has been
1634 enhanced to correctly identify UTF-8 content
1635 as ``text''.
1636
1637
1638 ''system()''__, backticks and pipe open now reflect__
1639 ''exec()'' __failure__
1640
1641
1642 On Unix and similar platforms, ''system()'', ''qx()''
1643 and open( FOO , ``cmd '') etc., are
1644 implemented via ''fork()'' and ''exec()''. When the
1645 underlying ''exec()'' fails, earlier versions did not
1646 report the error properly, since the ''exec()'' happened
1647 to be in a different process.
1648
1649
1650 The child process now communicates with the parent about the
1651 error in launching the external command, which allows these
1652 constructs to return with their usual error value and set
1653 $!.
1654
1655
1656 __Improved diagnostics__
1657
1658
1659 Line numbers are no longer suppressed (under most likely
1660 circumstances) during the global destruction
1661 phase.
1662
1663
1664 Diagnostics emitted from code running in threads other than
1665 the main thread are now accompanied by the thread
1666 ID .
1667
1668
1669 Embedded null characters in diagnostics now actually show
1670 up. They used to truncate the message in prior
1671 versions.
1672
1673
1674 $foo::a and $foo::b are now exempt from ``possible
1675 typo'' warnings only if ''sort()'' is encountered in
1676 package foo.
1677
1678
1679 Unrecognized alphabetic escapes encountered when parsing
1680 quote constructs now generate a warning, since they may take
1681 on new semantics in later versions of Perl.
1682
1683
1684 Many diagnostics now report the internal operation in which
1685 the warning was provoked, like so:
1686
1687
1688 Use of uninitialized value in concatenation (.) at (eval 1) line 1.
1689 Use of uninitialized value in print at (eval 1) line 1.
1690 Diagnostics that occur within eval may also report the file and line number where the eval is located, in addition to the eval sequence number and the line number within the evaluated text itself. For example:
1691
1692
1693 Not enough arguments for scalar at (eval 4)[[newlib/perl5db.pl:1411] line 2, at EOF
1694
1695
1696 __Diagnostics follow STDERR__
1697
1698
1699 Diagnostic output now goes to whichever file the
1700 STDERR handle is pointing at, instead of always
1701 going to the underlying C runtime library's
1702 stderr.
1703
1704
1705 __More consistent close-on-exec behavior__
1706
1707
1708 On systems that support a close-on-exec flag on filehandles,
1709 the flag is now set for any handles created by
1710 ''pipe()'', ''socketpair()'', ''socket()'', and
1711 ''accept()'', if that is warranted by the value of $^F
1712 that may be in effect. Earlier versions neglected to set the
1713 flag for handles created with these operators. See ``pipe''
1714 in perlfunc, ``socketpair'' in perlfunc, ``socket'' in
1715 perlfunc, ``accept'' in perlfunc, and ``$^F'' in
1716 perlvar.
1717
1718
1719 ''syswrite()'' __ease-of-use__
1720
1721
1722 The length argument of syswrite() has become
1723 optional.
1724
1725
1726 __Better syntax checks on parenthesized unary
1727 operators__
1728
1729
1730 Expressions such as:
1731
1732
1733 print defined(
1734 used to be accidentally allowed in earlier versions, and produced unpredictable behaviour. Some produced ancillary warnings when used in this way; others silently did the wrong thing.
1735
1736
1737 The parenthesized forms of most unary operators that expect
1738 a single argument now ensure that they are not called with
1739 more than one argument, making the cases shown above syntax
1740 errors. The usual behaviour of:
1741
1742
1743 print defined
1744 remains unchanged. See perlop.
1745
1746
1747 __Bit operators support full native integer
1748 width__
1749
1750
1751 The bit operators (
1752 $Config{ivsize}). For example, if
1753 your platform is either natively 64-bit or if Perl has been
1754 configured to use 64-bit integers, these operations apply to
1755 8 bytes (as opposed to 4 bytes on 32-bit platforms). For
1756 portability, be sure to mask off the excess bits in the
1757 result of unary ~, e.g., ~$x
1758 .
1759
1760
1761 __Improved security features__
1762
1763
1764 More potentially unsafe operations taint their results for
1765 improved security.
1766
1767
1768 The passwd and shell fields returned by
1769 the ''getpwent()'', ''getpwnam()'', and
1770 ''getpwuid()'' are now tainted, because the user can
1771 affect their own encrypted password and login
1772 shell.
1773
1774
1775 The variable modified by ''shmread()'', and messages
1776 returned by ''msgrcv()'' (and its object-oriented
1777 interface IPC::SysV::Msg::rcv) are also tainted, because
1778 other untrusted processes can modify messages and shared
1779 memory segments for their own nefarious
1780 purposes.
1781
1782
1783 __More functional bareword prototype (*)__
1784
1785
1786 Bareword prototypes have been rationalized to enable them to
1787 be used to override builtins that accept barewords and
1788 interpret them in a special way, such as require or
1789 do.
1790
1791
1792 Arguments prototyped as * will now be visible
1793 within the subroutine as either a simple scalar or as a
1794 reference to a typeglob. See ``Prototypes'' in
1795 perlsub.
1796
1797
1798 require __and__ do __may be
1799 overridden__
1800
1801
1802 require and do 'file' operations may be
1803 overridden locally by importing subroutines of the same name
1804 into the current package (or globally by importing them into
1805 the CORE::GLOBAL:: namespace). Overriding
1806 require will also affect use, provided the
1807 override is visible at compile-time. See ``Overriding
1808 Built-in Functions'' in perlsub.
1809
1810
1811 __$^X variables may now have names longer than one
1812 character__
1813
1814
1815 Formerly, $^X was synonymous with ${``cX''}, but $^XY was a
1816 syntax error. Now variable names that begin with a control
1817 character may be arbitrarily long. However, for
1818 compatibility reasons, these variables ''must'' be
1819 written with explicit braces, as ${^XY} for
1820 example. ${^XYZ} is synonymous with ${``cXYZ''}.
1821 Variable names with more than one control character, such as
1822 ${^XY^Z}, are illegal.
1823
1824
1825 The old syntax has not changed. As before, `^X' may be
1826 either a literal control-X character or the two-character
1827 sequence `caret' plus `X'. When braces are omitted, the
1828 variable name stops after the control character. Thus
1829 continues to be synonymous with
1830 $^X . as before.
1831
1832
1833 As before, lexical variables may not have names beginning
1834 with control characters. As before, variables whose names
1835 begin with a control character are always forced to be in
1836 package `main'. All such variables are reserved for future
1837 extensions, except those that begin with ^_, which
1838 may be used by user programs and are guaranteed not to
1839 acquire special meaning in any future version of
1840 Perl.
1841
1842
1843 __New variable $^C reflects__ -c
1844 __switch__
1845
1846
1847 $^C has a boolean value that reflects whether perl
1848 is being run in compile-only mode (i.e. via the -c
1849 switch). Since BEGIN blocks are executed
1850 under such conditions, this variable enables perl code to
1851 determine whether actions that make sense only during normal
1852 running are warranted. See perlvar.
1853
1854
1855 __New variable $^V contains Perl version as a
1856 string__
1857
1858
1859 $^V contains the Perl version number as a string
1860 composed of characters whose ordinals match the version
1861 numbers, i.e. v5.6.0. This may be used in string
1862 comparisons.
1863
1864
1865 See Support for strings represented as a vector of
1866 ordinals for an example.
1867
1868
1869 __Optional Y2K warnings__
1870
1871
1872 If Perl is built with the cpp macro PERL_Y2KWARN
1873 defined, it emits optional warnings when concatenating the
1874 number 19 with another number.
1875
1876
1877 This behavior must be specifically enabled when running
1878 Configure. See ''INSTALL'' and
1879 ''README .Y2K''.
1880
1881
1882 __Arrays now always interpolate into double-quoted
1883 strings__
1884
1885
1886 In double-quoted strings, arrays now interpolate, no matter
1887 what. The behavior in earlier versions of perl 5 was that
1888 arrays would interpolate into strings if the array had been
1889 mentioned before the string was compiled, and otherwise Perl
1890 would raise a fatal compile-time error. In versions 5.000
1891 through 5.003, the error was
1892
1893
1894 Literal @example now requires backslash
1895 In versions 5.004_01 through 5.6.0, the error was
1896
1897
1898 In string, @example now must be written as @example
1899 The idea here was to get people into the habit of writing when they wanted a literal @ sign, just as they have always written when they wanted a literal $ sign.
1900
1901
1902 Starting with 5.6.1, when Perl now sees an @ sign
1903 in a double-quoted string, it ''always'' attempts to
1904 interpolate an array, regardless of whether or not the array
1905 has been used or declared already. The fatal error has been
1906 downgraded to an optional warning:
1907
1908
1909 Possible unintended interpolation of @example in string
1910 This warns you that is going to turn into fred.com if you don't backslash the @. See http://www.plover.com/~mjd/perl/at-error.html for more details about the history here.
1911 !!Modules and Pragmata
1912
1913
1914 __Modules__
1915
1916
1917 attributes
1918
1919
1920 While used internally by Perl as a pragma, this module also
1921 provides a way to fetch subroutine and variable attributes.
1922 See attributes.
1923
1924
1925 B
1926
1927
1928 The Perl Compiler suite has been extensively reworked for
1929 this release. More of the standard Perl testsuite passes
1930 when run under the Compiler, but there is still a
1931 significant way to go to achieve production quality compiled
1932 executables.
1933
1934
1935 NOTE: The Compiler suite remains highly experimental. The
1936 generated code may not be correct, even when it manages to execute
1937 without errors.
1938
1939
1940 Benchmark
1941
1942
1943 Overall, Benchmark results exhibit lower average error and
1944 better timing accuracy.
1945
1946
1947 You can now run tests for ''n'' seconds instead of
1948 guessing the right number of tests to run: e.g.,
1949 timethese(-5, ...) will run each code for at least 5
1950 CPU seconds. Zero as the ``number of
1951 repetitions'' means ``for at least 3 CPU
1952 seconds''. The output format has also changed. For
1953 example:
1954
1955
1956 use Benchmark;$x=3;timethese(-5,{a=
1957 will now output something like this:
1958
1959
1960 Benchmark: running a, b, each for at least 5 CPU seconds...
1961 a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516)
1962 b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)
1963 New features: ``each for at least N CPU seconds...'', ``wallclock secs'', and the ``@ operations/CPU second (n=operations)''.
1964
1965
1966 ''timethese()'' now returns a reference to a hash of
1967 Benchmark objects containing the test results, keyed on the
1968 names of the tests.
1969
1970
1971 ''timethis()'' now returns the iterations field in the
1972 Benchmark result object instead of 0.
1973
1974
1975 ''timethese()'', ''timethis()'', and the new
1976 ''cmpthese()'' (see below) can also take a format
1977 specifier of 'none' to suppress output.
1978
1979
1980 A new function ''countit()'' is just like ''timeit()''
1981 except that it takes a TIME instead of a
1982 COUNT .
1983
1984
1985 A new function ''cmpthese()'' prints a chart comparing
1986 the results of each test returned from a ''timethese()''
1987 call. For each possible pair of tests, the percentage speed
1988 difference (iters/sec or seconds/iter) is
1989 shown.
1990
1991
1992 For other details, see Benchmark.
1993
1994
2 perry 1995 !ByteLoader
1 perry 1996
1997
2 perry 1998 The !ByteLoader is a dedicated extension to generate and run
1999 Perl bytecode. See !ByteLoader.
1 perry 2000
2001
2002 constant
2003
2004
2005 References can now be used.
2006
2007
2008 The new version also allows a leading underscore in constant
2009 names, but disallows a double leading underscore (as in
2010 ``__LINE__''). Some other names are disallowed or warned
2011 against, including BEGIN , END
2012 , etc. Some names which were forced into main:: used to fail
2013 silently in some cases; now they're fatal (outside of
2014 main::) and an optional warning (inside of main::). The
2015 ability to detect whether a constant had been set with a
2016 given name has been added.
2017
2018
2019 See constant.
2020
2021
2022 charnames
2023
2024
2025 This pragma implements the N string escape. See
2026 charnames.
2027
2028
2029 Data::Dumper
2030
2031
2032 A Maxdepth setting can be specified to avoid
2033 venturing too deeply into deep data structures. See
2034 Data::Dumper.
2035
2036
2037 The XSUB implementation of ''Dump()'' is
2038 now automatically called if the Useqq setting is
2039 not in use.
2040
2041
2042 Dumping qr// objects works correctly.
2043
2044
2045 DB
2046
2047
2048 DB is an experimental module that exposes a clean
2049 abstraction to Perl's debugging API
2050 .
2051
2052
2053 DB_File
2054
2055
2056 DB_File can now be built with Berkeley DB
2057 versions 1, 2 or 3. See
2058 ext/DB_File/Changes.
2059
2060
2061 Devel::DProf
2062
2063
2064 Devel::DProf, a Perl source code profiler has been added.
2065 See Devel::DProf and dprofpp.
2066
2067
2068 Devel::Peek
2069
2070
2071 The Devel::Peek module provides access to the internal
2072 representation of Perl variables and data. It is a data
2073 debugging tool for the XS
2074 programmer.
2075
2076
2077 Dumpvalue
2078
2079
2080 The Dumpvalue module provides screen dumps of Perl
2081 data.
2082
2083
2 perry 2084 !DynaLoader
1 perry 2085
2086
2 perry 2087 !DynaLoader now supports a ''dl_unload_file()'' function
1 perry 2088 on platforms that support unloading shared objects using
2089 ''dlclose()''.
2090
2091
2092 Perl can also optionally arrange to unload all extension
2093 shared objects loaded by Perl. To enable this, build Perl
2094 with the Configure option
2095 -Accflags=-DDL_UNLOAD_ALL_AT_EXIT. (This maybe
2096 useful if you are using Apache with mod_perl.)
2097
2098
2099 English
2100
2101
2102 $PERL_VERSION now stands for $^V (a string value)
2103 rather than for $] (a numeric value).
2104
2105
2106 Env
2107
2108
2109 Env now supports accessing environment variables like
2110 PATH as array variables.
2111
2112
2113 Fcntl
2114
2115
2116 More Fcntl constants added: F_SETLK64, F_SETLKW64,
2117 O_LARGEFILE for large file (more than 4GB) access (
2118 NOTE: the O_LARGEFILE is automatically added
2119 to ''sysopen()'' flags if large file support has been
2120 configured, as is the default), Free/Net/OpenBSD locking
2121 behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and
2122 O_ACCMODE: the combined mask of O_RDONLY, O_WRONLY, and
2123 O_RDWR. The ''seek()''/''sysseek()'' constants
2124 SEEK_SET , SEEK_CUR , and
2125 SEEK_END are available via the :seek
2126 tag. The ''chmod()''/''stat()'' S_IF* constants and
2127 S_IS* functions are available via the :mode
2128 tag.
2129
2130
2131 File::Compare
2132
2133
2134 A ''compare_text()'' function has been added, which
2135 allows custom comparison functions. See
2136 File::Compare.
2137
2138
2139 File::Find
2140
2141
2142 File::Find now works correctly when the ''wanted()''
2143 function is either autoloaded or is a symbolic
2144 reference.
2145
2146
2147 A bug that caused File::Find to lose track of the working
2148 directory when pruning top-level directories has been
2149 fixed.
2150
2151
2152 File::Find now also supports several other options to
2153 control its behavior. It can follow symbolic links if the
2154 follow option is specified. Enabling the
2155 no_chdir option will make File::Find skip changing
2156 the current directory when walking directories. The
2157 untaint flag can be useful when running with taint
2158 checks enabled.
2159
2160
2161 See File::Find.
2162
2163
2164 File::Glob
2165
2166
2167 This extension implements BSD-style file globbing. By
2168 default, it will also be used for the internal
2169 implementation of the ''glob()'' operator. See
2170 File::Glob.
2171
2172
2173 File::Spec
2174
2175
2176 New methods have been added to the File::Spec module:
2177 ''devnull()'' returns the name of the null device
2178 (/dev/null on Unix) and ''tmpdir()'' the name of the temp
2179 directory (normally /tmp on Unix). There are now also
2180 methods to convert between absolute and relative filenames:
2181 ''abs2rel()'' and ''rel2abs()''. For compatibility
2182 with operating systems that specify volume names in file
2183 paths, the ''splitpath()'', ''splitdir()'', and
2184 ''catdir()'' methods have been added.
2185
2186
2187 File::Spec::Functions
2188
2189
2190 The new File::Spec::Functions modules provides a function
2191 interface to the File::Spec module. Allows
2192 shorthand
2193
2194
2195 $fullname = catfile($dir1, $dir2, $file);
2196 instead of
2197
2198
2199 $fullname = File::Spec-
2200
2201
2202 Getopt::Long
2203
2204
2205 Getopt::Long licensing has changed to allow the Perl
2206 Artistic License as well as the GPL . It used
2207 to be GPL only, which got in the way of
2208 non-GPL applications that wanted to use
2209 Getopt::Long.
2210
2211
2212 Getopt::Long encourages the use of Pod::Usage to produce
2213 help messages. For example:
2214
2215
2216 use Getopt::Long;
2217 use Pod::Usage;
2218 my $man = 0;
2219 my $help = 0;
2 perry 2220 !GetOptions('help?' =
1 perry 2221 __END__
2222 =head1 NAME
2 perry 2223 sample - Using !GetOpt::Long and Pod::Usage
1 perry 2224 =head1 SYNOPSIS
2225 sample [[options] [[file ...]
2226 Options:
2227 -help brief help message
2228 -man full documentation
2229 =head1 OPTIONS
2230 =over 8
2231 =item B
2232 Print a brief help message and exits.
2233 =item B
2234 Prints the manual page and exits.
2235 =back
2236 =head1 DESCRIPTION
2237 B
2238 =cut
2239 See Pod::Usage for details.
2240
2241
2242 A bug that prevented the non-option call-back
2243
2244
2245 To specify the characters
2246
2247
2248 IO
2249
2250
2251 ''write()'' and ''syswrite()'' will now accept a
2252 single-argument form of the call, for consistency with
2253 Perl's ''syswrite()''.
2254
2255
2256 You can now create a TCP-based IO::Socket::INET without
2257 forcing a connect attempt. This allows you to configure its
2258 options (like making it non-blocking) and then call
2259 ''connect()'' manually.
2260
2261
2262 A bug that prevented the ''IO::Socket::protocol()''
2263 accessor from ever returning the correct value has been
2264 corrected.
2265
2266
2267 IO::Socket::connect now uses non-blocking IO
2268 instead of ''alarm()'' to do connect
2269 timeouts.
2270
2271
2272 IO::Socket::accept now uses ''select()'' instead of
2273 ''alarm()'' for doing timeouts.
2274
2275
2276 IO::Socket::INET-
2277
2278
2279 JPL
2280
2281
2282 Java Perl Lingo is now distributed with Perl. See jpl/README
2283 for more information.
2284
2285
2286 lib
2287
2288
2289 use lib now weeds out any trailing duplicate
2290 entries. no lib removes all named
2291 entries.
2292
2293
2 perry 2294 Math::!BigInt
1 perry 2295
2296
2297 The bitwise operations , ,
2298 , , and ~ are now supported on
2299 bigints.
2300
2301
2302 Math::Complex
2303
2304
2305 The accessor methods Re, Im, arg, abs, rho, and theta can
2306 now also act as mutators (accessor
2307 $z-Re()'', mutator
2308 $z-Re''(3)).
2309
2310
2311 The class method display_format and the
2312 corresponding object method display_format, in
2313 addition to accepting just one argument, now can also accept
2314 a parameter hash. Recognized keys of a parameter hash are
2315 , which corresponds to the old one
2316 parameter case, and two new parameters:
2317 , which is a
2318 ''printf()''-style format string (defaults usually to
2319 , you can revert to the default by
2320 setting the format string to undef) used for both
2321 parts of a complex number, and
2322 (defaults to true),
2323 which controls whether an attempt is made to try to
2324 recognize small multiples and rationals of pi (2pi, pi/2) at
2325 the argument (angle) of a polar complex number.
2326
2327
2328 The potentially disruptive change is that in list context
2329 both methods now ''return the parameter hash'', instead
2330 of only the value of the
2331 parameter.
2332
2333
2334 Math::Trig
2335
2336
2337 A little bit of radial trigonometry (cylindrical and
2338 spherical), radial coordinate conversions, and the great
2339 circle distance were added.
2340
2341
2 perry 2342 Pod::Parser, Pod::!InputObjects
1 perry 2343
2344
2345 Pod::Parser is a base class for parsing and selecting
2346 sections of pod documentation from an input stream. This
2347 module takes care of identifying pod paragraphs and commands
2348 in the input and hands off the parsed paragraphs and
2349 commands to user-defined methods which are free to interpret
2350 or translate them as they see fit.
2351
2352
2 perry 2353 Pod::!InputObjects defines some input objects needed by
1 perry 2354 Pod::Parser, and for advanced users of Pod::Parser that need
2355 more about a command besides its name and text.
2356
2357
2358 As of release 5.6.0 of Perl, Pod::Parser is now the
2359 officially sanctioned ``base parser code'' recommended for
2360 use by all pod2xxx translators. Pod::Text (pod2text) and
2361 Pod::Man (pod2man) have already been converted to use
2362 Pod::Parser and efforts to convert Pod::HTML (pod2html) are
2363 already underway. For any questions or comments about pod
2364 parsing and translating issues and utilities, please use the
2365 pod-people@perl.org mailing list.
2366
2367
2368 For further information, please see Pod::Parser and
2 perry 2369 Pod::!InputObjects.
1 perry 2370
2371
2372 Pod::Checker, podchecker
2373
2374
2375 This utility checks pod files for correct syntax, according
2376 to perlpod. Obvious errors are flagged as such, while
2377 warnings are printed for mistakes that can be handled
2378 gracefully. The checklist is not complete yet. See
2379 Pod::Checker.
2380
2381
2 perry 2382 Pod::!ParseUtils, Pod::Find
1 perry 2383
2384
2385 These modules provide a set of gizmos that are useful mainly
2386 for pod translators. Pod::Find traverses directory
2387 structures and returns found pod files, along with their
2388 canonical names (like File::Spec::Unix).
2 perry 2389 Pod::!ParseUtils contains __Pod::List__ (useful for
1 perry 2390 storing pod list information), __Pod::Hyperlink__ (for
2391 parsing the contents of L sequences) and
2392 __Pod::Cache__ (for caching information about pod files,
2393 e.g., link nodes).
2394
2395
2396 Pod::Select, podselect
2397
2398
2399 Pod::Select is a subclass of Pod::Parser which provides a
2400 function named ``''podselect()'''' to filter out
2401 user-specified sections of raw pod documentation from an
2402 input stream. podselect is a script that provides access to
2403 Pod::Select from other scripts to be used as a filter. See
2404 Pod::Select.
2405
2406
2407 Pod::Usage, pod2usage
2408
2409
2410 Pod::Usage provides the function ``''pod2usage()'''' to
2411 print usage messages for a Perl script based on its embedded
2412 pod documentation. The ''pod2usage()'' function is
2413 generally useful to all script authors since it lets them
2414 write and maintain a single source (the pods) for
2415 documentation, thus removing the need to create and maintain
2416 redundant usage message text consisting of information
2417 already in the pods.
2418
2419
2420 There is also a pod2usage script which can be used from
2421 other kinds of scripts to print usage messages from pods
2422 (even for non-Perl scripts with pods embedded in
2423 comments).
2424
2425
2426 For details and examples, please see
2427 Pod::Usage.
2428
2429
2430 Pod::Text and Pod::Man
2431
2432
2433 Pod::Text has been rewritten to use Pod::Parser. While
2434 ''pod2text()'' is still available for backwards
2435 compatibility, the module now has a new preferred interface.
2436 See Pod::Text for the details. The new Pod::Text module is
2437 easily subclassed for tweaks to the output, and two such
2438 subclasses (Pod::Text::Termcap for man-page-style bold and
2439 underlining using termcap information, and Pod::Text::Color
2440 for markup with ANSI color sequences) are now
2441 standard.
2442
2443
2444 pod2man has been turned into a module, Pod::Man, which also
2445 uses Pod::Parser. In the process, several outstanding bugs
2446 related to quotes in section headers, quoting of code
2447 escapes, and nested lists have been fixed. pod2man is now a
2448 wrapper script around this module.
2449
2450
2451 SDBM_File
2452
2453
2454 An EXISTS method has been added to this
2455 module (and ''sdbm_exists()'' has been added to the
2456 underlying sdbm library), so one can now call exists on an
2457 SDBM_File tied hash and get the correct result, rather than
2458 a runtime error.
2459
2460
2461 A bug that may have caused data loss when more than one disk
2462 block happens to be read from the database in a single
2463 ''FETCH ()'' has been fixed.
2464
2465
2466 Sys::Syslog
2467
2468
2469 Sys::Syslog now uses XSUBs to access facilities from
2470 syslog.h so it no longer requires syslog.ph to
2471 exist.
2472
2473
2474 Sys::Hostname
2475
2476
2477 Sys::Hostname now uses XSUBs to call the C library's
2478 ''gethostname()'' or ''uname()'' if they
2479 exist.
2480
2481
2482 Term::ANSIColor
2483
2484
2485 Term::ANSIColor is a very simple module to provide easy and
2486 readable access to the ANSI color and
2487 highlighting escape sequences, supported by most
2488 ANSI terminal emulators. It is now included
2489 standard.
2490
2491
2492 Time::Local
2493
2494
2495 The ''timelocal()'' and ''timegm()'' functions used to
2496 silently return bogus results when the date fell outside the
2497 machine's integer range. They now consistently
2498 ''croak()'' if the date falls in an unsupported
2499 range.
2500
2501
2502 Win32
2503
2504
2505 The error return value in list context has been changed for
2506 all functions that return a list of values. Previously these
2507 functions returned a list with a single element
2508 undef if an error occurred. Now these functions
2509 return the empty list in these situations. This applies to
2510 the following functions:
2511
2512
2 perry 2513 Win32::!FsType
1 perry 2514 Win32::GetOSVersion
2515 The remaining functions are unchanged and continue to return undef on error even in list context.
2516
2517
2 perry 2518 The Win32::!SetLastError( ERROR ) function has
1 perry 2519 been added as a complement to the
2 perry 2520 ''Win32::!GetLastError()'' function.
1 perry 2521
2522
2 perry 2523 The new Win32::!GetFullPathName( FILENAME )
1 perry 2524 returns the full absolute pathname for
2525 FILENAME in scalar context. In list context
2526 it returns a two-element list containing the fully qualified
2527 directory name and the filename. See Win32.
2528
2529
2530 XSLoader
2531
2532
2533 The XSLoader extension is a simpler alternative to
2 perry 2534 !DynaLoader. See XSLoader.
1 perry 2535
2536
2537 DBM Filters
2538
2539
2540 A new feature called `` DBM Filters'' has
2541 been added to all the DBM modules--DB_File,
2542 GDBM_File, NDBM_File, ODBM_File, and SDBM_File.
2543 DBM Filters add four new methods to each
2544 DBM module:
2545
2546
2547 filter_store_key
2548 filter_store_value
2549 filter_fetch_key
2550 filter_fetch_value
2551 These can be used to filter key-value pairs before the pairs are written to the database or just after they are read from the database. See perldbmfilter for further information.
2552
2553
2554 __Pragmata__
2555
2556
2557 use attrs is now obsolete, and is only provided for
2558 backward-compatibility. It's been replaced by the sub :
2559 attributes syntax. See ``Subroutine Attributes'' in
2560 perlsub and attributes.
2561
2562
2563 Lexical warnings pragma, use warnings;, to control
2564 optional warnings. See perllexwarn.
2565
2566
2567 use filetest to control the behaviour of filetests
2568 (-r -w ...). Currently only one subpragma
2569 implemented, ``use filetest 'access';'', that uses
2570 access(2) or equivalent to check permissions instead
2571 of using stat(2) as usual. This matters in
2572 filesystems where there are ACLs (access control lists): the
2573 stat(2) might lie, but access(2) knows
2574 better.
2575
2576
2577 The open pragma can be used to specify default
2578 disciplines for handle constructors (e.g. ''open()'') and
2579 for qx//. The two pseudo-disciplines :raw and
2580 :crlf are currently supported on DOS-derivative
2581 platforms (i.e. where binmode is not a no-op). See also
2582 ``''binmode()'' can be used to set :crlf and :raw
2583 modes''.
2584 !!Utility Changes
2585
2586
2587 __dprofpp__
2588
2589
2590 dprofpp is used to display profile data generated
2591 using Devel::DProf. See dprofpp.
2592
2593
2594 __find2perl__
2595
2596
2597 The find2perl utility now uses the enhanced
2598 features of the File::Find module. The -depth and -follow
2599 options are supported. Pod documentation is also included in
2600 the script.
2601
2602
2603 __h2xs__
2604
2605
2606 The h2xs tool can now work in conjunction with
2607 C::Scan (available from CPAN ) to
2608 automatically parse real-life header files. The -M,
2609 -a, -k, and -o options are
2610 new.
2611
2612
2613 __perlcc__
2614
2615
2616 perlcc now supports the C and Bytecode backends. By
2617 default, it generates output from the simple C backend
2618 rather than the optimized C backend.
2619
2620
2621 Support for non-Unix platforms has been
2622 improved.
2623
2624
2625 __perldoc__
2626
2627
2628 perldoc has been reworked to avoid possible
2629 security holes. It will not by default let itself be run as
2630 the superuser, but you may still use the __-U__ switch to
2631 try to make it drop privileges first.
2632
2633
2634 __The Perl Debugger__
2635
2636
2637 Many bug fixes and enhancements were added to
2638 ''perl5db.pl'', the Perl debugger. The help documentation
2639 was rearranged. New commands include ,
2640 , and { ? to list out current
2641 actions, man docpage to run your doc viewer on some
2642 perl docset, and support for quoted options. The help
2643 information was rearranged, and should be viewable once
2644 again if you're using __less__ as your pager. A serious
2645 security hole was plugged--you should immediately remove all
2646 older versions of the Perl debugger as installed in previous
2647 releases, all the way back to perl3, from your system to
2648 avoid being bitten by this.
2649 !!Improved Documentation
2650
2651
2652 Many of the platform-specific README files
2653 are now part of the perl installation. See perl for the
2654 complete list.
2655
2656
2657 perlapi.pod
2658
2659
2660 The official list of public Perl API
2661 functions.
2662
2663
2664 perlboot.pod
2665
2666
2667 A tutorial for beginners on object-oriented
2668 Perl.
2669
2670
2671 perlcompile.pod
2672
2673
2674 An introduction to using the Perl Compiler
2675 suite.
2676
2677
2678 perldbmfilter.pod
2679
2680
2681 A howto document on using the DBM filter
2682 facility.
2683
2684
2685 perldebug.pod
2686
2687
2688 All material unrelated to running the Perl debugger, plus
2689 all low-level guts-like details that risked crushing the
2690 casual user of the debugger, have been relocated from the
2691 old manpage to the next entry below.
2692
2693
2694 perldebguts.pod
2695
2696
2697 This new manpage contains excessively low-level material not
2698 related to the Perl debugger, but slightly related to
2699 debugging Perl itself. It also contains some arcane internal
2700 details of how the debugging process works that may only be
2701 of interest to developers of Perl debuggers.
2702
2703
2704 perlfork.pod
2705
2706
2707 Notes on the ''fork()'' emulation currently available for
2708 the Windows platform.
2709
2710
2711 perlfilter.pod
2712
2713
2714 An introduction to writing Perl source filters.
2715
2716
2717 perlhack.pod
2718
2719
2720 Some guidelines for hacking the Perl source
2721 code.
2722
2723
2724 perlintern.pod
2725
2726
2727 A list of internal functions in the Perl source code. (List
2728 is currently empty.)
2729
2730
2731 perllexwarn.pod
2732
2733
2734 Introduction and reference information about lexically
2735 scoped warning categories.
2736
2737
2738 perlnumber.pod
2739
2740
2741 Detailed information about numbers as they are represented
2742 in Perl.
2743
2744
2745 perlopentut.pod
2746
2747
2748 A tutorial on using ''open()'' effectively.
2749
2750
2751 perlreftut.pod
2752
2753
2754 A tutorial that introduces the essentials of
2755 references.
2756
2757
2758 perltootc.pod
2759
2760
2761 A tutorial on managing class data for object
2762 modules.
2763
2764
2765 perltodo.pod
2766
2767
2768 Discussion of the most often wanted features that may
2769 someday be supported in Perl.
2770
2771
2772 perlunicode.pod
2773
2774
2775 An introduction to Unicode support features in
2776 Perl.
2777 !!Performance enhancements
2778
2779
2780 __Simple__ ''sort()'' __using {__ $a
2781 ____ $b __} and the like are
2782 optimized__
2783
2784
2785 Many common ''sort()'' operations using a simple inlined
2786 block are now optimized for faster performance.
2787
2788
2789 __Optimized assignments to lexical
2790 variables__
2791
2792
2793 Certain operations in the RHS of assignment
2794 statements have been optimized to directly set the lexical
2795 variable on the LHS , eliminating redundant
2796 copying overheads.
2797
2798
2799 __Faster subroutine calls__
2800
2801
2802 Minor changes in how subroutine calls are handled internally
2803 provide marginal improvements in performance.
2804
2805
2806 ''delete()''__,__ ''each()''__,__
2807 ''values()'' __and hash iteration are
2808 faster__
2809
2810
2811 The hash values returned by ''delete()'', ''each()'',
2812 ''values()'' and hashes in a list context are the actual
2813 values in the hash, instead of copies. This results in
2814 significantly better performance, because it eliminates
2815 needless copying in most situations.
2816 !!Installation and Configuration Improvements
2817
2818
2819 __-Dusethreads means something different__
2820
2821
2822 The -Dusethreads flag now enables the experimental
2823 interpreter-based thread support by default. To get the
2824 flavor of experimental threads that was in 5.005 instead,
2825 you need to run Configure with ``-Dusethreads
2826 -Duse5005threads''.
2827
2828
2829 As of v5.6.0, interpreter-threads support is still lacking a
2830 way to create new threads from Perl (i.e., use
2831 Thread; will not work with interpreter threads).
2832 use Thread; continues to be available when you
2833 specify the -Duse5005threads option to Configure, bugs and
2834 all.
2835
2836
2837 NOTE: Support for threads continues to be an experimental feature.
2838 Interfaces and implementation are subject to sudden and drastic changes.
2839
2840
2841 __New Configure flags__
2842
2843
2844 The following new flags may be enabled on the Configure
2845 command line by running Configure with
2846 -Dflag.
2847
2848
2849 usemultiplicity
2850 usethreads useithreads (new interpreter threads: no Perl API yet)
2851 usethreads use5005threads (threads as they were in 5.005)
2852 use64bitint (equal to now deprecated 'use64bits')
2853 use64bitall
2854 uselongdouble
2855 usemorebits
2856 uselargefiles
2857 usesocks (only SOCKS v5 supported)
2858
2859
2860 __Threadedness and 64-bitness now more
2861 daring__
2862
2863
2864 The Configure options enabling the use of threads and the
2865 use of 64-bitness are now more daring in the sense that they
2866 no more have an explicit list of operating systems of known
2867 threads/64-bit capabilities. In other words: if your
2868 operating system has the necessary APIs and datatypes, you
2869 should be able just to go ahead and use them, for threads by
2870 Configure -Dusethreads, and for 64 bits either explicitly by
2871 Configure -Duse64bitint or implicitly if your system has
2872 64-bit wide datatypes. See also ``64-bit
2873 support''.
2874
2875
2876 __Long Doubles__
2877
2878
2879 Some platforms have ``long doubles'', floating point numbers
2880 of even larger range than ordinary ``doubles''. To enable
2881 using long doubles for Perl's scalars, use
2882 -Duselongdouble.
2883
2884
2885 __-Dusemorebits__
2886
2887
2888 You can enable both -Duse64bitint and -Duselongdouble with
2889 -Dusemorebits. See also ``64-bit support''.
2890
2891
2892 __-Duselargefiles__
2893
2894
2895 Some platforms support system APIs that are capable of
2896 handling large files (typically, files larger than two
2897 gigabytes). Perl will try to use these APIs if you ask for
2898 -Duselargefiles.
2899
2900
2901 See ``Large file support'' for more
2902 information.
2903
2904
2905 __installusrbinperl__
2906
2907
2908 You can use ``Configure -Uinstallusrbinperl'' which causes
2909 installperl to skip installing perl also as /usr/bin/perl.
2910 This is useful if you prefer not to modify /usr/bin for some
2911 reason or another but harmful because many scripts assume to
2912 find Perl in /usr/bin/perl.
2913
2914
2915 __SOCKS support__
2916
2917
2918 You can use ``Configure -Dusesocks'' which causes Perl to
2919 probe for the SOCKS proxy protocol library
2920 (v5, not v4). For more information on SOCKS ,
2921 see:
2922
2923
2924 http://www.socks.nec.com/
2925
2926
2927 -A __flag__
2928
2929
2930 You can ``post-edit'' the Configure variables using the
2931 Configure -A switch. The editing happens
2932 immediately after the platform specific hints files have
2933 been processed but before the actual configuration process
2934 starts. Run Configure -h to find out the full
2935 -A syntax.
2936
2937
2938 __Enhanced Installation Directories__
2939
2940
2941 The installation structure has been enriched to improve the
2942 support for maintaining multiple versions of perl, to
2943 provide locations for vendor-supplied modules, scripts, and
2944 manpages, and to ease maintenance of locally-added modules,
2945 scripts, and manpages. See the section on Installation
2946 Directories in the INSTALL file for complete
2947 details. For most users building and installing from source,
2948 the defaults should be fine.
2949
2950
2951 If you previously used Configure -Dsitelib or
2952 -Dsitearch to set special values for library
2953 directories, you might wish to consider using the new
2954 -Dsiteprefix setting instead. Also, if you wish to
2955 re-use a config.sh file from an earlier version of perl, you
2956 should be sure to check that Configure makes sensible
2957 choices for the new directories. See INSTALL
2958 for complete details.
2959
2960
2961 __gcc automatically tried if 'cc' does not seem to be
2962 working__
2963
2964
2965 In many platforms the vendor-supplied 'cc' is too
2966 stripped-down to build Perl (basically, the 'cc' doesn't do
2967 ANSI C). If this seems to be the case and the
2968 'cc' does not seem to be the GNU C compiler
2969 'gcc', an automatic attempt is made to find and use 'gcc'
2970 instead.
2971 !!Platform specific changes
2972
2973
2974 __Supported platforms__
2975
2976
2977 The Mach CThreads ( NEXTSTEP ,
2978 OPENSTEP ) are now supported by the Thread
2979 extension.
2980
2981
2982 GNU/Hurd is now supported.
2983
2984
2985 Rhapsody/Darwin is now supported.
2986
2987
2988 EPOC is now supported (on Psion
2989 5).
2990
2991
2992 The cygwin port (formerly cygwin32) has been greatly
2993 improved.
2994
2995
2996 __DOS__
2997
2998
2999 Perl now works with djgpp 2.02 (and 2.03
3000 alpha).
3001
3002
3003 Environment variable names are not converted to uppercase
3004 any more.
3005
3006
3007 Incorrect exit codes from backticks have been
3008 fixed.
3009
3010
3011 This port continues to use its own builtin globbing (not
3012 File::Glob).
3013
3014
2 perry 3015 __OS390 (!OpenEdition MVS
1 perry 3016 )__
3017
3018
3019 Support for this EBCDIC platform has not been
3020 renewed in this release. There are difficulties in
3021 reconciling Perl's standardization on UTF-8
3022 as its internal representation for characters with the
3023 EBCDIC character set, because the two are
3024 incompatible.
3025
3026
3027 It is unclear whether future versions will renew support for
3028 this platform, but the possibility exists.
3029
3030
3031 __VMS__
3032
3033
3034 Numerous revisions and extensions to configuration, build,
3035 testing, and installation process to accommodate core
3036 changes and VMS-specific options.
3037
3038
3039 Expand %ENV-handling code to allow runtime mapping
3040 to logical names, CLI symbols, and
3041 CRTL environ array.
3042
3043
3044 Extension of subprocess invocation code to accept filespecs
3045 as command ``verbs''.
3046
3047
3048 Add to Perl command line processing the ability to use
3049 default file types and to recognize Unix-style
3050 2.
3051
3052
3053 Expansion of File::Spec::VMS routines, and integration into
2 perry 3054 !ExtUtils::MM_VMS.
1 perry 3055
3056
2 perry 3057 Extension of !ExtUtils::MM_VMS to handle complex extensions
1 perry 3058 more flexibly.
3059
3060
3061 Barewords at start of Unix-syntax paths may be treated as
3062 text rather than only as logical names.
3063
3064
3065 Optional secure translation of several logical names used
3066 internally by Perl.
3067
3068
3069 Miscellaneous bugfixing and porting of new core code to
3070 VMS .
3071
3072
3073 Thanks are gladly extended to the many people who have
3074 contributed VMS patches, testing, and
3075 ideas.
3076
3077
3078 __Win32__
3079
3080
3081 Perl can now emulate ''fork()'' internally, using
3082 multiple interpreters running in different concurrent
3083 threads. This support must be enabled at build time. See
3084 perlfork for detailed information.
3085
3086
3087 When given a pathname that consists only of a drivename,
3088 such as A:, ''opendir()'' and ''stat()'' now
3089 use the current working directory for the drive rather than
3090 the drive root.
3091
3092
3093 The builtin XSUB functions in the Win32::
3094 namespace are documented. See Win32.
3095
3096
3097 $^X now contains the full path name of the running
3098 executable.
3099
3100
2 perry 3101 A ''Win32::!GetLongPathName()'' function is provided to
3102 complement ''Win32::!GetFullPathName()'' and
3103 ''Win32::!GetShortPathName()''. See Win32.
1 perry 3104
3105
3106 ''POSIX::uname()'' is supported.
3107
3108
3109 system(1,...) now returns true process IDs rather than
3110 process handles. ''kill()'' accepts any real process id,
3111 rather than strictly return values from
3112 system(1,...).
3113
3114
3115 For better compatibility with Unix, kill(0, $pid)
3116 can now be used to test whether a process
3117 exists.
3118
3119
3120 The Shell module is supported.
3121
3122
3123 Better support for building Perl under command.com in
3124 Windows 95 has been added.
3125
3126
3127 Scripts are read in binary mode by default to allow
2 perry 3128 !ByteLoader (and the filter mechanism in general) to work
1 perry 3129 properly. For compatibility, the DATA
3130 filehandle will be set to text mode if a carriage return is
3131 detected at the end of the line containing the __END__ or
3132 __DATA__ token; if not, the DATA filehandle
3133 will be left open in binary mode. Earlier versions always
3134 opened the DATA filehandle in text
3135 mode.
3136
3137
3138 The ''glob()'' operator is implemented via the
3139 File::Glob extension, which supports glob syntax of
3140 the C shell. This increases the flexibility of the
3141 ''glob()'' operator, but there may be compatibility
3142 issues for programs that relied on the older globbing
3143 syntax. If you want to preserve compatibility with the older
3144 syntax, you might want to run perl with
2 perry 3145 -MFile::!DosGlob. For details and compatibility
1 perry 3146 information, see File::Glob.
3147 !!Significant bug fixes
3148
3149
3150 ____HANDLE
3151
3152
3153 With $/ set to undef, ``slurping'' an
3154 empty file returns a string of zero length (instead of
3155 undef, as it used to) the first time the
3156 HANDLE is read after $/ is set to
3157 undef. Further reads yield
3158 undef.
3159
3160
3161 This means that the following will append ``foo'' to an
3162 empty file (it used to do nothing):
3163
3164
3165 perl -0777 -pi -e 's/^/foo/' empty_file
3166 The behaviour of:
3167
3168
3169 perl -pi -e 's/^/foo/' empty_file
3170 is unchanged (it continues to leave the file empty).
3171
3172
3173 eval '...' __improvements__
3174
3175
3176 Line numbers (as reflected by ''caller()'' and most
3177 diagnostics) within eval '...' were often incorrect
3178 where here documents were involved. This has been
3179 corrected.
3180
3181
3182 Lexical lookups for variables appearing in eval
3183 '...' within functions that were themselves called
3184 within an eval '...' were searching the wrong place
3185 for lexicals. The lexical search now correctly ends at the
3186 subroutine's block boundary.
3187
3188
3189 The use of return within eval {...} caused
3190 $@ not to be reset correctly when no exception occurred
3191 within the eval. This has been fixed.
3192
3193
3194 Parsing of here documents used to be flawed when they
3195 appeared as the replacement expression in eval
3196 's/.../.../e'. This has been fixed.
3197
3198
3199 __All compilation errors are true errors__
3200
3201
3202 Some ``errors'' encountered at compile time were by
3203 necessity generated as warnings followed by eventual
3204 termination of the program. This enabled more such errors to
3205 be reported in a single run, rather than causing a hard stop
3206 at the first error that was encountered.
3207
3208
3209 The mechanism for reporting such errors has been
3210 reimplemented to queue compile-time errors and report them
3211 at the end of the compilation as true errors rather than as
3212 warnings. This fixes cases where error messages leaked
3213 through in the form of warnings when code was compiled at
3214 run time using eval STRING, and also allows such
3215 errors to be reliably trapped using eval
3216 .
3217
3218
3219 __Implicitly closed filehandles are safer__
3220
3221
3222 Sometimes implicitly closed filehandles (as when they are
3223 localized, and Perl automatically closes them on exiting the
3224 scope) could inadvertently set $? or $!. This has been
3225 corrected.
3226
3227
3228 __Behavior of list slices is more
3229 consistent__
3230
3231
3232 When taking a slice of a literal list (as opposed to a slice
3233 of an array or hash), Perl used to return an empty list if
3234 the result happened to be composed of all undef
3235 values.
3236
3237
3238 The new behavior is to produce an empty list if (and only
3239 if) the original list was empty. Consider the following
3240 example:
3241
3242
3243 @a = (1,undef,undef,2)[[2,1,2];
3244 The old behavior would have resulted in @a having no elements. The new behavior ensures it has three undefined elements.
3245
3246
3247 Note in particular that the behavior of slices of the
3248 following cases remains unchanged:
3249
3250
3251 @a = ()[[1,2];
3252 @a = (getpwent)[[7,0];
3253 @a = (anything_returning_empty_list())[[2,1,2];
3254 @a = @b[[2,1,2];
3255 @a = @c{'a','b','c'};
3256 See perldata.
3257
3258
3259 ($) __prototype and__
3260 $foo{a}
3261
3262
3263 A scalar reference prototype now correctly allows a hash or
3264 array element in that slot.
3265
3266
3267 goto __and
3268 AUTOLOAD__
3269
3270
3271 The goto construct works correctly when
3272 happens to be autoloaded.
3273
3274
3275 -bareword __allowed under__ use
3276 integer
3277
3278
3279 The autoquoting of barewords preceded by - did not
3280 work in prior versions when the integer pragma was
3281 enabled. This has been fixed.
3282
3283
3284 __Failures in__ ''DESTROY
3285 ()''
3286
3287
3288 When code in a destructor threw an exception, it went
3289 unnoticed in earlier versions of Perl, unless someone
3290 happened to be looking in $@ just after the point the
3291 destructor happened to run. Such failures are now visible as
3292 warnings when warnings are enabled.
3293
3294
3295 __Locale bugs fixed__
3296
3297
3298 ''printf()'' and ''sprintf()'' previously reset the
3299 numeric locale back to the default ``C'' locale. This has
3300 been fixed.
3301
3302
3303 Numbers formatted according to the local numeric locale
3304 (such as using a decimal comma instead of a decimal dot)
3305 caused ``isn't numeric'' warnings, even while the operations
3306 accessing those numbers produced correct results. These
3307 warnings have been discontinued.
3308
3309
3310 __Memory leaks__
3311
3312
3313 The eval 'return sub {...}' construct could
3314 sometimes leak memory. This has been fixed.
3315
3316
3317 Operations that aren't filehandle constructors used to leak
3318 memory when used on invalid filehandles. This has been
3319 fixed.
3320
3321
3322 Constructs that modified @_ could fail to
3323 deallocate values in @_ and thus leak memory. This
3324 has been corrected.
3325
3326
3327 __Spurious subroutine stubs after failed subroutine
3328 calls__
3329
3330
3331 Perl could sometimes create empty subroutine stubs when a
3332 subroutine was not found in the package. Such cases stopped
3333 later method lookups from progressing into base packages.
3334 This has been corrected.
3335
3336
3337 __Taint failures under__ -U
3338
3339
3340 When running in unsafe mode, taint violations could
3341 sometimes cause silent failures. This has been
3342 fixed.
3343
3344
3345 __END blocks and the__ -c
3346 __switch__
3347
3348
3349 Prior versions used to run BEGIN __and__
3350 END blocks when Perl was run in compile-only
3351 mode. Since this is typically not the expected behavior,
3352 END blocks are not executed anymore when the
3353 -c switch is used, or if compilation
3354 fails.
3355
3356
3357 See ``Support for CHECK blocks'' for how to
3358 run things when the compile phase ends.
3359
3360
3361 __Potential to leak DATA
3362 filehandles__
3363
3364
3365 Using the __DATA__ token creates an implicit
3366 filehandle to the file that contains the token. It is the
3367 program's responsibility to close it when it is done reading
3368 from it.
3369
3370
3371 This caveat is now better explained in the documentation.
3372 See perldata.
3373 !!New or Changed Diagnostics
3374
3375
3376 ``%s'' variable %s masks earlier declaration in
3377 same %s
3378
3379
3380 (W misc) A ``my'' or ``our'' variable has been redeclared in
3381 the current scope or statement, effectively eliminating all
3382 access to the previous instance. This is almost always a
3383 typographical error. Note that the earlier variable will
3384 still exist until the end of the scope or until all closure
3385 referents to it are destroyed.
3386
3387
3388 ``my sub'' not yet implemented
3389
3390
3391 (F) Lexically scoped subroutines are not yet implemented.
3392 Don't try that yet.
3393
3394
3395 ``our'' variable %s redeclared
3396
3397
3398 (W misc) You seem to have already declared the same global
3399 once before in the current lexical scope.
3400
3401
3402 '!' allowed only after types %s
3403
3404
3405 (F) The '!' is allowed in ''pack()'' and ''unpack()''
3406 only after certain types. See ``pack'' in
3407 perlfunc.
3408
3409
3410 / cannot take a count
3411
3412
3413 (F) You had an unpack template indicating a counted-length
3414 string, but you have also specified an explicit size for the
3415 string. See ``pack'' in perlfunc.
3416
3417
3418 / must be followed by a, A or Z
3419
3420
3421 (F) You had an unpack template indicating a counted-length
3422 string, which must be followed by one of the letters a, A or
3423 Z to indicate what sort of string is to be unpacked. See
3424 ``pack'' in perlfunc.
3425
3426
3427 / must be followed by a*, A* or Z*
3428
3429
3430 (F) You had a pack template indicating a counted-length
3431 string, Currently the only things that can have their length
3432 counted are a*, A* or Z*. See ``pack'' in
3433 perlfunc.
3434
3435
3436 / must follow a numeric type
3437
3438
3439 (F) You had an unpack template that contained a '#', but
3440 this did not follow some numeric unpack specification. See
3441 ``pack'' in perlfunc.
3442
3443
3444 /%s/: Unrecognized escape \%c passed through
3445
3446
3447 (W regexp) You used a backslash-character combination which
3448 is not recognized by Perl. This combination appears in an
3449 interpolated variable or a '-delimited regular
3450 expression. The character was understood
3451 literally.
3452
3453
3454 /%s/: Unrecognized escape \%c in character class passed
3455 through
3456
3457
3458 (W regexp) You used a backslash-character combination which
3459 is not recognized by Perl inside character classes. The
3460 character was understood literally.
3461
3462
3463 /%s/ should probably be written as ``%s''
3464
3465
3466 (W syntax) You have used a pattern where Perl expected to
3467 find a string, as in the first argument to join.
3468 Perl will treat the true or false result of matching the
3469 pattern against $_ as the string, which is probably
3470 not what you had in mind.
3471
3472
3473 %s() called too early to check prototype
3474
3475
3476 (W prototype) You've called a function that has a prototype
3477 before the parser saw a definition or declaration for it,
3478 and Perl could not check that the call conforms to the
3479 prototype. You need to either add an early prototype
3480 declaration for the subroutine in question, or move the
3481 subroutine definition ahead of the call to get proper
3482 prototype checking. Alternatively, if you are certain that
3483 you're calling the function correctly, you may put an
3484 ampersand before the name to avoid the warning. See
3485 perlsub.
3486
3487
3488 %s argument is not a HASH or
3489 ARRAY element
3490
3491
3492 (F) The argument to ''exists()'' must be a hash or array
3493 element, such as:
3494
3495
3496 $foo{$bar}
3497 $ref-
3498
3499
3500 %s argument is not a HASH or
3501 ARRAY element or slice
3502
3503
3504 (F) The argument to ''delete()'' must be either a hash or
3505 array element, such as:
3506
3507
3508 $foo{$bar}
3509 $ref-
3510 or a hash or array slice, such as:
3511
3512
3513 @foo[[$bar, $baz, $xyzzy]
3514 @{$ref-
3515
3516
3517 %s argument is not a subroutine name
3518
3519
3520 (F) The argument to ''exists()'' for exists
3521 must be a subroutine name, and not a
3522 subroutine call. exists will generate
3523 this error.
3524
3525
3526 %s package attribute may clash with future reserved word:
3527 %s
3528
3529
3530 (W reserved) A lowercase attribute name was used that had a
3531 package-specific handler. That name might have a meaning to
3532 Perl itself some day, even though it doesn't yet. Perhaps
3533 you should use a mixed-case attribute name, instead. See
3534 attributes.
3535
3536
3537 (in cleanup) %s
3538
3539
3540 (W misc) This prefix usually indicates that a
3541 ''DESTROY ()'' method raised the indicated
3542 exception. Since destructors are usually called by the
3543 system at arbitrary points during execution, and often a
3544 vast number of times, the warning is issued only once for
3545 any number of failures that would otherwise result in the
3546 same message being repeated.
3547
3548
3549 Failure of user callbacks dispatched using the
3550 G_KEEPERR flag could also result in this warning.
3551 See ``G_KEEPERR'' in perlcall.
3552
3553
3554
3555
3556 (F) You wrote require when you should
3557 have written require 'file'.
3558
3559
3560 Attempt to join self
3561
3562
3563 (F) You tried to join a thread from within itself, which is
3564 an impossible task. You may be joining the wrong thread, or
3565 you may need to move the ''join()'' to some other
3566 thread.
3567
3568
3569 Bad evalled substitution pattern
3570
3571
3572 (F) You've used the /e switch to evaluate the replacement
3573 for a substitution, but perl found a syntax error in the
3574 code to evaluate, most likely an unexpected right brace
3575 '}'.
3576
3577
3578 Bad ''realloc()'' ignored
3579
3580
3581 (S) An internal routine called ''realloc()'' on something
3582 that had never been ''malloc()''ed in the first place.
3583 Mandatory, but can be disabled by setting environment
3584 variable PERL_BADFREE to 1.
3585
3586
3587 Bareword found in conditional
3588
3589
3590 (W bareword) The compiler found a bareword where it expected
3591 a conditional, which often indicates that an or
3592
3593
3594 open FOO die;
3595 It may also indicate a misspelled constant that has been interpreted as a bareword:
3596
3597
3598 use constant TYPO =
3599 The strict pragma is useful in avoiding such errors.
3600
3601
3602 Binary number
3603
3604
3605 (W portable) The binary number you specified is larger than
3606 2**32-1 (4294967295) and therefore non-portable between
3607 systems. See perlport for more on portability
3608 concerns.
3609
3610
3611 Bit vector size
3612
3613
3614 (W portable) Using bit vector sizes larger than 32 is
3615 non-portable.
3616
3617
3618 Buffer overflow in prime_env_iter: %s
3619
3620
3621 (W internal) A warning peculiar to VMS .
3622 While Perl was preparing to iterate over %ENV, it
3623 encountered a logical name or symbol definition which was
3624 too long, so it was truncated to the string
3625 shown.
3626
3627
3628 Can't check filesystem of script ``%s''
3629
3630
3631 (P) For some reason you can't check the filesystem of the
3632 script for nosuid.
3633
3634
3635 Can't declare class for non-scalar %s in
3636 ``%s''
3637
3638
3639 (S) Currently, only scalar variables can declared with a
3640 specific class qualifier in a ``my'' or ``our'' declaration.
3641 The semantics may be extended for other types of variables
3642 in future.
3643
3644
3645 Can't declare %s in ``%s''
3646
3647
3648 (F) Only scalar, array, and hash variables may be declared
3649 as ``my'' or ``our'' variables. They must have ordinary
3650 identifiers as names.
3651
3652
3653 Can't ignore signal CHLD , forcing to
3654 default
3655
3656
3657 (W signal) Perl has detected that it is being run with the
3658 SIGCHLD signal (sometimes known as
3659 SIGCLD ) disabled. Since disabling this
3660 signal will interfere with proper determination of exit
3661 status of child processes, Perl has reset the signal to its
3662 default value. This situation typically indicates that the
3663 parent program under which Perl may be running (e.g., cron)
3664 is being very careless.
3665
3666
3667 Can't modify non-lvalue subroutine call
3668
3669
3670 (F) Subroutines meant to be used in lvalue context should be
3671 declared as such, see ``Lvalue subroutines'' in
3672 perlsub.
3673
3674
3675 Can't read CRTL environ
3676
3677
3678 (S) A warning peculiar to VMS . Perl tried to
3679 read an element of %ENV from the
3680 CRTL 's internal environment array and
3681 discovered the array was missing. You need to figure out
3682 where your CRTL misplaced its environ or
3683 define ''PERL_ENV_TABLES'' (see perlvms)
3684 so that environ is not searched.
3685
3686
3687 Can't remove %s: %s, skipping file
3688
3689
3690 (S) You requested an inplace edit without creating a backup
3691 file. Perl was unable to remove the original file to replace
3692 it with the modified file. The file was left
3693 unmodified.
3694
3695
3696 Can't return %s from lvalue subroutine
3697
3698
3699 (F) Perl detected an attempt to return illegal lvalues (such
3700 as temporary or readonly values) from a subroutine used as
3701 an lvalue. This is not allowed.
3702
3703
3704 Can't weaken a nonreference
3705
3706
3707 (F) You attempted to weaken something that was not a
3708 reference. Only references can be weakened.
3709
3710
3711 Character class [[:%s:] unknown
3712
3713
3714 (F) The class in the character class [[: :] syntax is
3715 unknown. See perlre.
3716
3717
3718 Character class syntax [[%s] belongs inside character
3719 classes
3720
3721
3722 (W unsafe) The character class constructs [[: :], [[= =], and
3723 [[. .] go ''inside'' character classes, the [[] are part of
3724 the construct, for example: /[[012[[:alpha:]345]/. Note that
3725 [[= =] and [[. .] are not currently implemented; they are
3726 simply placeholders for future extensions.
3727
3728
3729 Constant is not %s reference
3730
3731
3732 (F) A constant value (perhaps declared using the use
3733 constant pragma) is being dereferenced, but it amounts
3734 to the wrong type of reference. The message indicates the
3735 type of reference that was expected. This usually indicates
3736 a syntax error in dereferencing the constant value. See
3737 ``Constant Functions'' in perlsub and constant.
3738
3739
3740 constant(%s): %s
3741
3742
3743 (F) The parser found inconsistencies either while attempting
3744 to define an overloaded constant, or when trying to find the
3745 character name specified in the N{...} escape.
3746 Perhaps you forgot to load the corresponding
3747 overload or charnames pragma? See
3748 charnames and overload.
3749
3750
3751 CORE::%s is not a keyword
3752
3753
3754 (F) The CORE:: namespace is reserved for Perl
3755 keywords.
3756
3757
3758 defined(@array) is deprecated
3759
3760
3761 (D) ''defined()'' is not usually useful on arrays because
3762 it checks for an undefined ''scalar'' value. If you want
3763 to see if the array is empty, just use if (@array) { #
3764 not empty } for example.
3765
3766
3767 defined(%hash) is deprecated
3768
3769
3770 (D) ''defined()'' is not usually useful on hashes because
3771 it checks for an undefined ''scalar'' value. If you want
3772 to see if the hash is empty, just use if (%hash) { # not
3773 empty } for example.
3774
3775
3776 Did not produce a valid header
3777
3778
3779 See Server error.
3780
3781
3782 (Did you mean ``local'' instead of ``our''?)
3783
3784
3785 (W misc) Remember that ``our'' does not localize the
3786 declared global variable. You have declared it again in the
3787 same lexical scope, which seems superfluous.
3788
3789
3790 Document contains no data
3791
3792
3793 See Server error.
3794
3795
3796 entering effective %s failed
3797
3798
3799 (F) While under the use filetest pragma, switching
3800 the real and effective uids or gids failed.
3801
3802
3803 false [[] range ``%s'' in regexp
3804
3805
3806 (W regexp) A character class range must start and end at a
3807 literal character, not another character class like
3808 d or [[:alpha:]. The ``-'' in your false
3809 range is interpreted as a literal ``-''. Consider quoting
3810 the ``-'', ``-''. See perlre.
3811
3812
3813 Filehandle %s opened only for output
3814
3815
3816 (W io) You tried to read from a filehandle opened only for
3817 writing. If you intended it to be a read/write filehandle,
3818 you needed to open it with ``+
3819
3820
3821 ''flock()'' on closed filehandle %s
3822
3823
3824 (W closed) The filehandle you're attempting to
3825 ''flock()'' got itself closed some time before now. Check
3826 your logic flow. ''flock()'' operates on filehandles. Are
3827 you attempting to call ''flock()'' on a dirhandle by the
3828 same name?
3829
3830
3831 Global symbol ``%s'' requires explicit package
3832 name
3833
3834
3835 (F) You've said ``use strict vars'', which indicates that
3836 all variables must either be lexically scoped (using
3837 ``my''), declared beforehand using ``our'', or explicitly
3838 qualified to say which package the global variable is in
3839 (using ``::'').
3840
3841
3842 Hexadecimal number
3843
3844
3845 (W portable) The hexadecimal number you specified is larger
3846 than 2**32-1 (4294967295) and therefore non-portable between
3847 systems. See perlport for more on portability
3848 concerns.
3849
3850
3851 Ill-formed CRTL environ value
3852 ``%s''
3853
3854
3855 (W internal) A warning peculiar to VMS . Perl
3856 tried to read the CRTL 's internal environ
3857 array, and encountered an element without the =
3858 delimiter used to separate keys from values. The element is
3859 ignored.
3860
3861
3862 Ill-formed message in prime_env_iter: %s
3863
3864
3865 (W internal) A warning peculiar to VMS . Perl
3866 tried to read a logical name or CLI symbol
3867 definition when preparing to iterate over %ENV, and
3868 didn't see the expected delimiter between key and value, so
3869 the line was ignored.
3870
3871
3872 Illegal binary digit %s
3873
3874
3875 (F) You used a digit other than 0 or 1 in a binary
3876 number.
3877
3878
3879 Illegal binary digit %s ignored
3880
3881
3882 (W digit) You may have tried to use a digit other than 0 or
3883 1 in a binary number. Interpretation of the binary number
3884 stopped before the offending digit.
3885
3886
3887 Illegal number of bits in vec
3888
3889
3890 (F) The number of bits in ''vec()'' (the third argument)
3891 must be a power of two from 1 to 32 (or 64, if your platform
3892 supports that).
3893
3894
3895 Integer overflow in %s number
3896
3897
3898 (W overflow) The hexadecimal, octal or binary number you
3899 have specified either as a literal or as an argument to
3900 ''hex()'' or ''oct()'' is too big for your
3901 architecture, and has been converted to a floating point
3902 number. On a 32-bit architecture the largest hexadecimal,
3903 octal or binary number representable without overflow is
3904 0xFFFFFFFF, 037777777777, or
3905 0b11111111111111111111111111111111 respectively. Note that
3906 Perl transparently promotes all numbers to a floating point
3907 representation internally--subject to loss of precision
3908 errors in subsequent operations.
3909
3910
3911 Invalid %s attribute: %s
3912
3913
3914 The indicated attribute for a subroutine or variable was not
3915 recognized by Perl or by a user-supplied handler. See
3916 attributes.
3917
3918
3919 Invalid %s attributes: %s
3920
3921
3922 The indicated attributes for a subroutine or variable were
3923 not recognized by Perl or by a user-supplied handler. See
3924 attributes.
3925
3926
3927 invalid [[] range ``%s'' in regexp
3928
3929
3930 The offending range is now explicitly
3931 displayed.
3932
3933
3934 Invalid separator character %s in attribute
3935 list
3936
3937
3938 (F) Something other than a colon or whitespace was seen
3939 between the elements of an attribute list. If the previous
3940 attribute had a parenthesised parameter list, perhaps that
3941 list was terminated too soon. See attributes.
3942
3943
3944 Invalid separator character %s in subroutine
3945 attribute list
3946
3947
3948 (F) Something other than a colon or whitespace was seen
3949 between the elements of a subroutine attribute list. If the
3950 previous attribute had a parenthesised parameter list,
3951 perhaps that list was terminated too soon.
3952
3953
3954 leaving effective %s failed
3955
3956
3957 (F) While under the use filetest pragma, switching
3958 the real and effective uids or gids failed.
3959
3960
3961 Lvalue subs returning %s not implemented
3962 yet
3963
3964
3965 (F) Due to limitations in the current implementation, array
3966 and hash values cannot be returned in subroutines used in
3967 lvalue context. See ``Lvalue subroutines'' in
3968 perlsub.
3969
3970
3971 Method %s not permitted
3972
3973
3974 See Server error.
3975
3976
3977 Missing %sbrace%s on N{}
3978
3979
3980 (F) Wrong syntax of character name literal
3981 N{charname} within double-quotish
3982 context.
3983
3984
3985 Missing command in piped open
3986
3987
3988 (W pipe) You used the open(FH,
3989 or open(FH,
3990 construction, but the command was missing or
3991 blank.
3992
3993
3994 Missing name in ``my sub''
3995
3996
3997 (F) The reserved syntax for lexically scoped subroutines
3998 requires that they have a name with which they can be
3999 found.
4000
4001
4002 No %s specified for -%c
4003
4004
4005 (F) The indicated command line switch needs a mandatory
4006 argument, but you haven't specified one.
4007
4008
4009 No package name allowed for variable %s in
4010 ``our''
4011
4012
4013 (F) Fully qualified variable names are not allowed in
4014 ``our'' declarations, because that doesn't make much sense
4015 under existing semantics. Such syntax is reserved for future
4016 extensions.
4017
4018
4019 No space allowed after -%c
4020
4021
4022 (F) The argument to the indicated command line switch must
4023 follow immediately after the switch, without intervening
4024 spaces.
4025
4026
4027 no UTC offset information; assuming local
4028 time is UTC
4029
4030
4031 (S) A warning peculiar to VMS . Perl was
4032 unable to find the local timezone offset, so it's assuming
4033 that local system time is equivalent to UTC .
4034 If it's not, define the logical name
4035 ''SYS$TIMEZONE_DIFFERENTIAL'' to translate
4036 to the number of seconds which need to be added to
4037 UTC to get local time.
4038
4039
4040 Octal number
4041
4042
4043 (W portable) The octal number you specified is larger than
4044 2**32-1 (4294967295) and therefore non-portable between
4045 systems. See perlport for more on portability
4046 concerns.
4047
4048
4049 See also perlport for writing portable code.
4050
4051
4052 panic: del_backref
4053
4054
4055 (P) Failed an internal consistency check while trying to
4056 reset a weak reference.
4057
4058
4059 panic: kid popen errno read
4060
4061
4062 (F) forked child returned an incomprehensible message about
4063 its errno.
4064
4065
4066 panic: magic_killbackrefs
4067
4068
4069 (P) Failed an internal consistency check while trying to
4070 reset all weak references to an object.
4071
4072
4073 Parentheses missing around ``%s'' list
4074
4075
4076 (W parenthesis) You said something like
4077
4078
4079 my $foo, $bar = @_;
4080 when you meant
4081
4082
4083 my ($foo, $bar) = @_;
4084 Remember that ``my'', ``our'', and ``local'' bind tighter than comma.
4085
4086
4087 Possible unintended interpolation of %s in
4088 string
4089
4090
4091 (W ambiguous) It used to be that Perl would try to guess
4092 whether you wanted an array interpolated or a literal @. It
4093 no longer does this; arrays are now ''always''
4094 interpolated into strings. This means that if you try
4095 something like:
4096
4097
4098 print
4099 and the array @example doesn't exist, Perl is going to print fred.com, which is probably not what you wanted. To get a literal @ sign in a string, put a backslash before it, just as you would to get a literal $ sign.
4100
4101
4102 Possible Y2K bug: %s
4103
4104
4105 (W y2k) You are concatenating the number 19 with another
4106 number, which could be a potential Year 2000
4107 problem.
4108
4109
4110 pragma ``attrs'' is deprecated, use ``sub
4111 NAME : ATTRS ''
4112 instead
4113
4114
4115 (W deprecated) You have written something like
4116 this:
4117
4118
4119 sub doit
4120 {
4121 use attrs qw(locked);
4122 }
4123 You should use the new declaration syntax instead.
4124
4125
4126 sub doit : locked
4127 {
4128 ...
4129 The use attrs pragma is now obsolete, and is only provided for backward-compatibility. See ``Subroutine Attributes'' in perlsub.
4130
4131
4132 Premature end of script headers
4133
4134
4135 See Server error.
4136
4137
4138 Repeat count in pack overflows
4139
4140
4141 (F) You can't specify a repeat count so large that it
4142 overflows your signed integers. See ``pack'' in
4143 perlfunc.
4144
4145
4146 Repeat count in unpack overflows
4147
4148
4149 (F) You can't specify a repeat count so large that it
4150 overflows your signed integers. See ``unpack'' in
4151 perlfunc.
4152
4153
4154 ''realloc()'' of freed memory ignored
4155
4156
4157 (S) An internal routine called ''realloc()'' on something
4158 that had already been freed.
4159
4160
4161 Reference is already weak
4162
4163
4164 (W misc) You have attempted to weaken a reference that is
4165 already weak. Doing so has no effect.
4166
4167
4168 setpgrp can't take arguments
4169
4170
4171 (F) Your system has the ''setpgrp()'' from
4172 BSD 4.2, which takes no arguments, unlike
4173 POSIX ''setpgid()'', which takes a process
4174 ID and process group ID
4175 .
4176
4177
4178 Strange *+?{} on zero-length expression
4179
4180
4181 (W regexp) You applied a regular expression quantifier in a
4182 place where it makes no sense, such as on a zero-width
4183 assertion. Try putting the quantifier inside the assertion
4184 instead. For example, the way to match ``abc'' provided that
4185 it is followed by three repetitions of ``xyz'' is
4186 /abc(?=(?:xyz){3})/, not
4187 /abc(?=xyz){3}/.
4188
4189
4190 switching effective %s is not
4191 implemented
4192
4193
4194 (F) While under the use filetest pragma, we cannot
4195 switch the real and effective uids or gids.
4196
4197
4198 This Perl can't reset CRTL environ elements
4199 (%s)
4200
4201
4202 This Perl can't set CRTL environ elements
4203 (%s=%s)
4204
4205
4206 (W internal) Warnings peculiar to VMS . You
4207 tried to change or delete an element of the
4208 CRTL 's internal environ array, but your copy
4209 of Perl wasn't built with a CRTL that
4210 contained the ''setenv()'' function. You'll need to
4211 rebuild Perl with a CRTL that does, or
4212 redefine ''PERL_ENV_TABLES'' (see perlvms)
4213 so that the environ array isn't the target of the change to
4214 %ENV which produced the warning.
4215
4216
4217 Too late to run %s block
4218
4219
4220 (W void) A CHECK or INIT block
4221 is being defined during run time proper, when the
4222 opportunity to run them has already passed. Perhaps you are
4223 loading a file with require or do when you
4224 should be using use instead. Or perhaps you should
4225 put the require or do inside a
4226 BEGIN block.
4227
4228
4229 Unknown ''open()'' mode '%s'
4230
4231
4232 (F) The second argument of 3-argument ''open()'' is not
4233 among the list of valid modes: , ,
4234 , +, +,
4235 +, -, -.
4236
4237
4238 Unknown process %x sent message to prime_env_iter:
4239 %s
4240
4241
4242 (P) An error peculiar to VMS . Perl was
4243 reading values for %ENV before iterating over it,
4244 and someone else stuck a message in the stream of data Perl
4245 expected. Someone's very confused, or perhaps trying to
4246 subvert Perl's population of %ENV for nefarious
4247 purposes.
4248
4249
4250 Unrecognized escape \%c passed through
4251
4252
4253 (W misc) You used a backslash-character combination which is
4254 not recognized by Perl. The character was understood
4255 literally.
4256
4257
4258 Unterminated attribute parameter in attribute
4259 list
4260
4261
4262 (F) The lexer saw an opening (left) parenthesis character
4263 while parsing an attribute list, but the matching closing
4264 (right) parenthesis character was not found. You may need to
4265 add (or remove) a backslash character to get your
4266 parentheses to balance. See attributes.
4267
4268
4269 Unterminated attribute list
4270
4271
4272 (F) The lexer found something other than a simple identifier
4273 at the start of an attribute, and it wasn't a semicolon or
4274 the start of a block. Perhaps you terminated the parameter
4275 list of the previous attribute too soon. See
4276 attributes.
4277
4278
4279 Unterminated attribute parameter in subroutine attribute
4280 list
4281
4282
4283 (F) The lexer saw an opening (left) parenthesis character
4284 while parsing a subroutine attribute list, but the matching
4285 closing (right) parenthesis character was not found. You may
4286 need to add (or remove) a backslash character to get your
4287 parentheses to balance.
4288
4289
4290 Unterminated subroutine attribute list
4291
4292
4293 (F) The lexer found something other than a simple identifier
4294 at the start of a subroutine attribute, and it wasn't a
4295 semicolon or the start of a block. Perhaps you terminated
4296 the parameter list of the previous attribute too
4297 soon.
4298
4299
4300 Value of CLI symbol ``%s'' too
4301 long
4302
4303
4304 (W misc) A warning peculiar to VMS . Perl
4305 tried to read the value of an %ENV element from a
4306 CLI symbol table, and found a resultant
4307 string longer than 1024 characters. The return value has
4308 been truncated to 1024 characters.
4309
4310
4311 Version number must be a constant number
4312
4313
4314 (P) The attempt to translate a use Module n.n LIST
4315 statement into its equivalent BEGIN block found an
4316 internal inconsistency with the version number.
4317 !!New tests
4318
4319
4320 lib/attrs
4321
4322
4323 Compatibility tests for sub : attrs vs the older
4324 use attrs.
4325
4326
4327 lib/env
4328
4329
4330 Tests for new environment scalar capability (e.g., use
4331 Env qw($BAR);).
4332
4333
4334 lib/env-array
4335
4336
4337 Tests for new environment array capability (e.g., use
4338 Env qw(@PATH);).
4339
4340
4341 lib/io_const
4342
4343
4344 IO constants (SEEK_*, _IO*).
4345
4346
4347 lib/io_dir
4348
4349
4350 Directory-related IO methods (new, read,
4351 close, rewind, tied delete).
4352
4353
4354 lib/io_multihomed
4355
4356
4357 INET sockets with multi-homed
4358 hosts.
4359
4360
4361 lib/io_poll
4362
4363
4364 IO ''poll()''.
4365
4366
4367 lib/io_unix
4368
4369
4370 UNIX sockets.
4371
4372
4373 op/attrs
4374
4375
4376 Regression tests for my ($x,@y,%z) : attrs and
4377
4378
4379 op/filetest
4380
4381
4382 File test operators.
4383
4384
4385 op/lex_assign
4386
4387
4388 Verify operations that access pad objects (lexicals and
4389 temporaries).
4390
4391
4392 op/exists_sub
4393
4394
4395 Verify exists operations.
4396 !!Incompatible Changes
4397
4398
4399 __Perl Source Incompatibilities__
4400
4401
4402 Beware that any new warnings that have been added or old
4403 ones that have been enhanced are __not__ considered
4404 incompatible changes.
4405
4406
4407 Since all new warnings must be explicitly requested via the
4408 -w switch or the warnings pragma, it is
4409 ultimately the programmer's responsibility to ensure that
4410 warnings are enabled judiciously.
4411
4412
4413 CHECK is a new keyword
4414
4415
4416 All subroutine definitions named CHECK are
4417 now special. See /
4418 for more information.
4419
4420
4421 Treatment of list slices of undef has changed
4422
4423
4424 There is a potential incompatibility in the behavior of list
4425 slices that are comprised entirely of undefined values. See
4426 ``Behavior of list slices is more consistent''.
4427
4428
4429 Format of $English::PERL_VERSION is
4430 different
4431
4432
4433 The English module now sets $PERL_VERSION to $^V (a
4434 string value) rather than $] (a numeric value).
4435 This is a potential incompatibility. Send us a report via
4436 perlbug if you are affected by this.
4437
4438
4439 See ``Improved Perl version numbering system'' for the
4440 reasons for this change.
4441
4442
4443 Literals of the form 1.2.3 parse
4444 differently
4445
4446
4447 Previously, numeric literals with more than one dot in them
4448 were interpreted as a floating point number concatenated
4449 with one or more numbers. Such ``numbers'' are now parsed as
4450 strings composed of the specified ordinals.
4451
4452
4453 For example, print 97.98.99 used to output
4454 97.9899 in earlier versions, but now prints
4455 abc.
4456
4457
4458 See ``Support for strings represented as a vector of
4459 ordinals''.
4460
4461
4462 Possibly changed pseudo-random number generator
4463
4464
4465 Perl programs that depend on reproducing a specific set of
4466 pseudo-random numbers may now produce different output due
4467 to improvements made to the ''rand()'' builtin. You can
4468 use sh Configure -Drandfunc=rand to obtain the old
4469 behavior.
4470
4471
4472 See ``Better pseudo-random number generator''.
4473
4474
4475 Hashing function for hash keys has changed
4476
4477
4478 Even though Perl hashes are not order preserving, the
4479 apparently random order encountered when iterating on the
4480 contents of a hash is actually determined by the hashing
4481 algorithm used. Improvements in the algorithm may yield a
4482 random order that is __different__ from that of previous
4483 versions, especially when iterating on hashes.
4484
4485
4486 See ``Better worst-case behavior of hashes'' for additional
4487 information.
4488
4489
4490 undef fails on read only values
4491
4492
4493 Using the undef operator on a readonly value (such
4494 as $1) has the same effect as assigning
4495 undef to the readonly value--it throws an
4496 exception.
4497
4498
4499 Close-on-exec bit may be set on pipe and socket
4500 handles
4501
4502
4503 Pipe and socket handles are also now subject to the
4504 close-on-exec behavior determined by the special variable
4505 $^F.
4506
4507
4508 See ``More consistent close-on-exec behavior''.
4509
4510
4511 Writing ``$$1'' to mean ``${$}1'' is
4512 unsupported
4513
4514
4515 Perl 5.004 deprecated the interpretation of $$1 and
4516 similar within interpolated strings to mean $$ .
4517 , but still allowed it.
4518
4519
4520 In Perl 5.6.0 and later, always
4521 means .
4522
4523
4524 ''delete()'', ''each()'', ''values()'' and
4525
4526
4527 operate on aliases to values, not copies
4528
4529
4530 ''delete()'', ''each()'', ''values()'' and hashes
4531 (e.g. ) in a list context return the actual values
4532 in the hash, instead of copies (as they used to in earlier
4533 versions). Typical idioms for using these constructs copy
4534 the returned values, but this can make a significant
4535 difference when creating references to the returned values.
4536 Keys in the hash are still returned as copies when iterating
4537 on a hash.
4538
4539
4540 See also ``''delete()'', ''each()'', ''values()''
4541 and hash iteration are faster''.
4542
4543
4544 vec( EXPR ,OFFSET,BITS) enforces
4545 powers-of-two BITS
4546
4547
4548 ''vec()'' generates a run-time error if the
4549 BITS argument is not a valid power-of-two
4550 integer.
4551
4552
4553 Text of some diagnostic output has changed
4554
4555
4556 Most references to internal Perl operations in diagnostics
4557 have been changed to be more descriptive. This may be an
4558 issue for programs that may incorrectly rely on the exact
4559 text of diagnostics for proper functioning.
4560
4561
4562 %@ has been removed
4563
4564
4565 The undocumented special variable %@ that used to
4566 accumulate ``background'' errors (such as those that happen
4567 in ''DESTROY ()'') has been removed,
4568 because it could potentially result in memory
4569 leaks.
4570
4571
4572 Parenthesized ''not()'' behaves like a list
4573 operator
4574
4575
4576 The not operator now falls under the ``if it looks
4577 like a function, it behaves like a function''
4578 rule.
4579
4580
4581 As a result, the parenthesized form can be used with
4582 grep and map. The following construct used
4583 to be a syntax error before, but it works as expected
4584 now:
4585
4586
4587 grep not($_), @things;
4588 On the other hand, using not with a literal list slice may not work. The following previously allowed construct:
4589
4590
4591 print not (1,2,3)[[0];
4592 needs to be written with additional parentheses now:
4593
4594
4595 print not((1,2,3)[[0]);
4596 The behavior remains unaffected when not is not followed by parentheses.
4597
4598
4599 Semantics of bareword prototype (*) have
4600 changed
4601
4602
4603 The semantics of the bareword prototype * have
4604 changed. Perl 5.005 always coerced simple scalar arguments
4605 to a typeglob, which wasn't useful in situations where the
4606 subroutine must distinguish between a simple scalar and a
4607 typeglob. The new behavior is to not coerce bareword
4608 arguments to a typeglob. The value will always be visible as
4609 either a simple scalar or as a reference to a
4610 typeglob.
4611
4612
4613 See ``More functional bareword prototype (*)''.
4614
4615
4616 Semantics of bit operators may have changed on 64-bit
4617 platforms
4618
4619
4620 If your platform is either natively 64-bit or if Perl has
4621 been configured to used 64-bit integers, i.e.,
4622 $Config{ivsize} is 8, there may be a potential
4623 incompatibility in the behavior of bitwise numeric operators
4624 (
4625 ~
4626 will produce different results on platforms that have
4627 different $Config{ivsize}. For portability, be sure
4628 to mask off the excess bits in the result of unary
4629 ~, e.g., ~$x
4630 .
4631
4632
4633 See ``Bit operators support full native integer
4634 width''.
4635
4636
4637 More builtins taint their results
4638
4639
4640 As described in ``Improved security features'', there may be
4641 more sources of taint in a Perl program.
4642
4643
4644 To avoid these new tainting behaviors, you can build Perl
4645 with the Configure option
4646 -Accflags=-DINCOMPLETE_TAINTS. Beware that the
4647 ensuing perl binary may be insecure.
4648
4649
4650 __C Source Incompatibilities__
4651
4652
4653 PERL_POLLUTE
4654
4655
4656 Release 5.005 grandfathered old global symbol names by
4657 providing preprocessor macros for extension source
4658 compatibility. As of release 5.6.0, these preprocessor
4659 definitions are not available by default. You need to
4660 explicitly compile perl with -DPERL_POLLUTE to get
4661 these definitions. For extensions still using the old
4662 symbols, this option can be specified via
2 perry 4663 !MakeMaker:
1 perry 4664
4665
4666 perl Makefile.PL POLLUTE=1
4667
4668
4669 PERL_IMPLICIT_CONTEXT
4670
4671
4672 This new build option provides a set of macros for all
4673 API functions such that an implicit
4674 interpreter/thread context argument is passed to every
4675 API function. As a result of this, something
4676 like sv_setsv(foo,bar) amounts to a macro
4677 invocation that actually translates to something like
4678 Perl_sv_setsv(my_perl,foo,bar). While this is
4679 generally expected to not have any significant source
4680 compatibility issues, the difference between a macro and a
4681 real function call will need to be considered.
4682
4683
4684 This means that there __is__ a source compatibility issue
4685 as a result of this if your extensions attempt to use
4686 pointers to any of the Perl API
4687 functions.
4688
4689
4690 Note that the above issue is not relevant to the default
4691 build of Perl, whose interfaces continue to match those of
4692 prior versions (but subject to the other options described
4693 here).
4694
4695
4696 See ``The Perl API '' in perlguts for
4697 detailed information on the ramifications of building Perl
4698 with this option.
4699
4700
4701 NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
4702 with one of -Dusethreads, -Dusemultiplicity, or both. It is not
4703 intended to be enabled by users at this time.
4704
4705
4706 PERL_POLLUTE_MALLOC
4707
4708
4709 Enabling Perl's malloc in release 5.005 and earlier caused
4710 the namespace of the system's malloc family of functions to
4711 be usurped by the Perl versions, since by default they used
4712 the same names. Besides causing problems on platforms that
4713 do not allow these functions to be cleanly replaced, this
4714 also meant that the system versions could not be called in
4715 programs that used Perl's malloc. Previous versions of Perl
4716 have allowed this behaviour to be suppressed with the
4717 HIDEMYMALLOC and EMBEDMYMALLOC
4718 preprocessor definitions.
4719
4720
4721 As of release 5.6.0, Perl's malloc family of functions have
4722 default names distinct from the system versions. You need to
4723 explicitly compile perl with -DPERL_POLLUTE_MALLOC
4724 to get the older behaviour. HIDEMYMALLOC and
4725 EMBEDMYMALLOC have no effect, since the
4726 behaviour they enabled is now the default.
4727
4728
4729 Note that these functions do __not__ constitute Perl's
4730 memory allocation API . See ``Memory
4731 Allocation'' in perlguts for further information about
4732 that.
4733
4734
4735 __Compatible C Source API
4736 Changes__
4737
4738
4739 PATCHLEVEL is now
4740 PERL_VERSION
4741
4742
4743 The cpp macros PERL_REVISION,
4744 PERL_VERSION, and PERL_SUBVERSION are now
4745 available by default from perl.h, and reflect the base
4746 revision, patchlevel, and subversion respectively.
4747 PERL_REVISION had no prior equivalent, while
4748 PERL_VERSION and PERL_SUBVERSION were
4749 previously available as PATCHLEVEL and
4750 SUBVERSION.
4751
4752
4753 The new names cause less pollution of the __cpp__
4754 namespace and reflect what the numbers have come to stand
4755 for in common practice. For compatibility, the old names are
4756 still supported when ''patchlevel.h'' is explicitly
4757 included (as required before), so there is no source
4758 incompatibility from the change.
4759
4760
4761 __Binary Incompatibilities__
4762
4763
4764 In general, the default build of this release is expected to
4765 be binary compatible for extensions built with the 5.005
4766 release or its maintenance versions. However, specific
4767 platforms may have broken binary compatibility due to
4768 changes in the defaults used in hints files. Therefore,
4769 please be sure to always check the platform-specific
4770 README files for any notes to the
4771 contrary.
4772
4773
4774 The usethreads or usemultiplicity builds are __not__
4775 binary compatible with the corresponding builds in
4776 5.005.
4777
4778
4779 On platforms that require an explicit list of exports (
4780 AIX , OS/2 and Windows, among
4781 others), purely internal symbols such as parser functions
4782 and the run time opcodes are not exported by default. Perl
4783 5.005 used to export all functions irrespective of whether
4784 they were considered part of the public API
4785 or not.
4786
4787
4788 For the full list of public API functions,
4789 see perlapi.
4790 !!Known Problems
4791
4792
4793 __Localizing a tied hash element may leak
4794 memory__
4795
4796
4797 As of the 5.6.1 release, there is a known leak when code
4798 such as this is executed:
4799
4800
4801 use Tie::Hash;
4802 tie my %tie_hash =
4803 ...
4804 local($tie_hash{Foo}) = 1; # leaks
4805
4806
4807 __Known test failures__
4808
4809
4810 64-bit builds
4811
4812
4813 Subtest #15 of lib/b.t may fail under 64-bit builds on
4814 platforms such as HP-UX PA64 and Linux
4815 IA64 . The issue is still being
4816 investigated.
4817
4818
4819 The lib/io_multihomed test may hang in HP-UX if Perl has
4820 been configured to be 64-bit. Because other 64-bit platforms
4821 do not hang in this test, HP-UX is suspect. All other tests
4822 pass in 64-bit HP-UX . The test attempts to
4823 create and connect to ``multihomed'' sockets (sockets which
4824 have multiple IP addresses).
4825
4826
4827 Note that 64-bit support is still experimental.
4828
4829
4830 Failure of Thread tests
4831
4832
4833 The subtests 19 and 20 of lib/thr5005.t test are known to
4834 fail due to fundamental problems in the 5.005 threading
4835 implementation. These are not new failures--Perl 5.005_0x
4836 has the same bugs, but didn't have these tests. (Note that
4837 support for 5.005-style threading remains
4838 experimental.)
4839
4840
4841 NEXTSTEP 3.3 POSIX test
4842 failure
4843
4844
4845 In NEXTSTEP 3.3p2 the implementation of the
4846 strftime(3) in the operating system libraries is
4847 buggy: the %j format numbers the days of a month
4848 starting from zero, which, while being logical to
4849 programmers, will cause the subtests 19 to 27 of the
4850 lib/posix test may fail.
4851
4852
4853 Tru64 (aka Digital UNIX , aka DEC
4854 OSF/1 ) lib/sdbm test failure with gcc
4855
4856
4857 If compiled with gcc 2.95 the lib/sdbm test will fail (dump
4858 core). The cure is to use the vendor cc, it comes with the
4859 operating system and produces good code.
4860
4861
4862 __EBCDIC platforms not fully
4863 supported__
4864
4865
4866 In earlier releases of Perl, EBCDIC
4867 environments like OS390 (also known as Open
4868 Edition MVS ) and VM-ESA were supported. Due
4869 to changes required by the UTF-8 (Unicode)
4870 support, the EBCDIC platforms are not
4871 supported in Perl 5.6.0.
4872
4873
4874 The 5.6.1 release improves support for EBCDIC
4875 platforms, but they are not fully supported
4876 yet.
4877
4878
4879 __UNICOS/mk CC failures during Configure
4880 run__
4881
4882
4883 In UNICOS/mk the following errors may appear during the
4884 Configure run:
4885
4886
4887 Guessing which symbols your C compiler and preprocessor define...
4888 CC-20 cc: ERROR File = try.c, Line = 3
4889 ...
4890 bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
4891 ...
4892 4 errors detected in the compilation of
4893 The culprit is the broken awk of UNICOS/mk. The effect is fortunately rather mild: Perl itself is not adversely affected by the error, only the h2ph utility coming with Perl, and that is rather rarely needed these days.
4894
4895
4896 __Arrow operator and arrays__
4897
4898
4899 When the left argument to the arrow operator -
4900 is an array, or the scalar operator operating on an
4901 array, the result of the operation must be considered
4902 erroneous. For example:
4903
4904
4905 @x-
4906 These expressions will get run-time errors in some future release of Perl.
4907
4908
4909 __Experimental features__
4910
4911
4912 As discussed above, many features are still experimental.
4913 Interfaces and implementation of these features are subject
4914 to change, and in extreme cases, even subject to removal in
4915 some future release of Perl. These features include the
4916 following:
4917
4918
4919 Threads
4920
4921
4922 Unicode
4923
4924
4925 64-bit support
4926
4927
4928 Lvalue subroutines
4929
4930
4931 Weak references
4932
4933
4934 The pseudo-hash data type
4935
4936
4937 The Compiler suite
4938
4939
4940 Internal implementation of file globbing
4941
4942
4943 The DB module
4944
4945
4946 The regular expression code constructs:
4947
4948
4949 (?{ code }) and (??{ code })
4950 !!Obsolete Diagnostics
4951
4952
4953 Character class syntax [[: :] is reserved for future
4954 extensions
4955
4956
4957 (W) Within regular expression character classes ([[]) the
4958 syntax beginning with ``[[:'' and ending with ``:]'' is
4959 reserved for future extensions. If you need to represent
4960 those character sequences inside a regular expression
4961 character class, just quote the square brackets with the
4962 backslash: ``[[:'' and ``:]''.
4963
4964
4965 Ill-formed logical name %s in prime_env_iter
4966
4967
4968 (W) A warning peculiar to VMS . A logical
4969 name was encountered when preparing to iterate over
4970 %ENV which violates the syntactic rules governing
4971 logical names. Because it cannot be translated normally, it
4972 is skipped, and will not appear in %ENV. This may
4973 be a benign occurrence, as some software packages might
4974 directly modify logical name tables and introduce
4975 nonstandard names, or it may indicate that a logical name
4976 table has been corrupted.
4977
4978
4979 In string, @%s now must be written as @%s
4980
4981
4982 The description of this error used to say:
4983
4984
4985 (Someday it will simply assume that an unbackslashed @
4986 interpolates an array.)
4987 That day has come, and this fatal error has been removed. It has been replaced by a non-fatal warning instead. See ``Arrays now always interpolate into double-quoted strings'' for details.
4988
4989
4990 Probable precedence problem on %s
4991
4992
4993 (W) The compiler found a bareword where it expected a
4994 conditional, which often indicates that an or
4995
4996
4997 open FOO die;
4998
4999
5000 regexp too big
5001
5002
5003 (F) The current implementation of regular expressions uses
5004 shorts as address offsets within a string. Unfortunately
5005 this means that if the regular expression compiles to longer
5006 than 32767, it'll blow up. Usually when you want a regular
5007 expression this big, there is a better way to do it with
5008 multiple statements. See perlre.
5009
5010
5011 Use of ``$$
5012
5013
5014 (D) Perl versions before 5.004 misinterpreted any type
5015 marker followed by ``$'' and a digit. For example, ``$$0''
5016 was incorrectly taken to mean ``${$}0'' instead of
5017 ``${$0}''. This bug is (mostly) fixed in Perl
5018 5.004.
5019
5020
5021 However, the developers of Perl 5.004 could not fix this bug
5022 completely, because at least two widely-used modules depend
5023 on the old meaning of ``$$0'' in a string. So Perl 5.004
5024 still interprets ``$$
5025 !!Reporting Bugs
5026
5027
5028 If you find what you think is a bug, you might check the
5029 articles recently posted to the comp.lang.perl.misc
5030 newsgroup. There may also be information at
5031 http://www.perl.com/, the Perl Home Page.
5032
5033
5034 If you believe you have an unreported bug, please run the
5035 __perlbug__ program included with your release. Be sure
5036 to trim your bug down to a tiny but sufficient test case.
5037 Your bug report, along with the output of perl -V,
5038 will be sent off to perlbug@perl.org to be analysed by the
5039 Perl porting team.
5040 !!SEE ALSO
5041
5042
5043 The ''Changes'' file for exhaustive details on what
5044 changed.
5045
5046
5047 The ''INSTALL'' file for how to build
5048 Perl.
5049
5050
5051 The ''README'' file for general
5052 stuff.
5053
5054
5055 The ''Artistic'' and ''Copying'' files for copyright
5056 information.
5057 !!HISTORY
5058
5059
5060 Written by Gurusamy Sarathy
2 perry 5061 gsar@!ActiveState.com''
1 perry 5062 ''
5063
5064
5065 Send omissions or corrections to
5066 perlbug@perl.org''''
5067 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.