-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathperl5005delta.html
935 lines (597 loc) · 49.6 KB
/
perl5005delta.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>perl5005delta - what's new for perl5.005</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:[email protected]" />
</head>
<body>
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#About-the-new-versioning-system">About the new versioning system</a></li>
<li><a href="#Incompatible-Changes">Incompatible Changes</a>
<ul>
<li><a href="#WARNING:-This-version-is-not-binary-compatible-with-Perl-5.004">WARNING: This version is not binary compatible with Perl 5.004.</a></li>
<li><a href="#Default-installation-structure-has-changed">Default installation structure has changed</a></li>
<li><a href="#Perl-Source-Compatibility">Perl Source Compatibility</a></li>
<li><a href="#C-Source-Compatibility">C Source Compatibility</a></li>
<li><a href="#Binary-Compatibility">Binary Compatibility</a></li>
<li><a href="#Security-fixes-may-affect-compatibility">Security fixes may affect compatibility</a></li>
<li><a href="#Relaxed-new-mandatory-warnings-introduced-in-5.004">Relaxed new mandatory warnings introduced in 5.004</a></li>
<li><a href="#Licensing">Licensing</a></li>
</ul>
</li>
<li><a href="#Core-Changes">Core Changes</a>
<ul>
<li><a href="#Threads">Threads</a></li>
<li><a href="#Compiler">Compiler</a></li>
<li><a href="#Regular-Expressions">Regular Expressions</a></li>
<li><a href="#Improved-malloc">Improved malloc()</a></li>
<li><a href="#Quicksort-is-internally-implemented">Quicksort is internally implemented</a></li>
<li><a href="#Reliable-signals">Reliable signals</a></li>
<li><a href="#Reliable-stack-pointers">Reliable stack pointers</a></li>
<li><a href="#More-generous-treatment-of-carriage-returns">More generous treatment of carriage returns</a></li>
<li><a href="#Memory-leaks">Memory leaks</a></li>
<li><a href="#Better-support-for-multiple-interpreters">Better support for multiple interpreters</a></li>
<li><a href="#Behavior-of-local-on-array-and-hash-elements-is-now-well-defined">Behavior of local() on array and hash elements is now well-defined</a></li>
<li><a href="#is-transparently-tied-to-the-Errno-module">%! is transparently tied to the Errno module</a></li>
<li><a href="#Pseudo-hashes-are-supported">Pseudo-hashes are supported</a></li>
<li><a href="#EXPR-foreach-EXPR-is-supported">EXPR foreach EXPR is supported</a></li>
<li><a href="#Keywords-can-be-globally-overridden">Keywords can be globally overridden</a></li>
<li><a href="#E-is-meaningful-on-Win32">$^E is meaningful on Win32</a></li>
<li><a href="#foreach-1..1000000-optimized">foreach (1..1000000) optimized</a></li>
<li><a href="#Foo::-can-be-used-as-implicitly-quoted-package-name">Foo:: can be used as implicitly quoted package name</a></li>
<li><a href="#exists-Foo::-Bar::-tests-existence-of-a-package">exists $Foo::{Bar::} tests existence of a package</a></li>
<li><a href="#Better-locale-support">Better locale support</a></li>
<li><a href="#Experimental-support-for-64-bit-platforms">Experimental support for 64-bit platforms</a></li>
<li><a href="#prototype-returns-useful-results-on-builtins">prototype() returns useful results on builtins</a></li>
<li><a href="#Extended-support-for-exception-handling">Extended support for exception handling</a></li>
<li><a href="#Re-blessing-in-DESTROY-supported-for-chaining-DESTROY-methods">Re-blessing in DESTROY() supported for chaining DESTROY() methods</a></li>
<li><a href="#All-printf-format-conversions-are-handled-internally">All printf format conversions are handled internally</a></li>
<li><a href="#New-INIT-keyword">New INIT keyword</a></li>
<li><a href="#New-lock-keyword">New lock keyword</a></li>
<li><a href="#New-qr-operator">New qr// operator</a></li>
<li><a href="#our-is-now-a-reserved-word">our is now a reserved word</a></li>
<li><a href="#Tied-arrays-are-now-fully-supported">Tied arrays are now fully supported</a></li>
<li><a href="#Tied-handles-support-is-better">Tied handles support is better</a></li>
<li><a href="#th-argument-to-substr">4th argument to substr</a></li>
<li><a href="#Negative-LENGTH-argument-to-splice">Negative LENGTH argument to splice</a></li>
<li><a href="#Magic-lvalues-are-now-more-magical">Magic lvalues are now more magical</a></li>
<li><a href="#now-reads-in-records"><> now reads in records</a></li>
</ul>
</li>
<li><a href="#Supported-Platforms">Supported Platforms</a>
<ul>
<li><a href="#New-Platforms">New Platforms</a></li>
<li><a href="#Changes-in-existing-support">Changes in existing support</a></li>
</ul>
</li>
<li><a href="#Modules-and-Pragmata">Modules and Pragmata</a>
<ul>
<li><a href="#New-Modules">New Modules</a></li>
<li><a href="#Changes-in-existing-modules">Changes in existing modules</a></li>
</ul>
</li>
<li><a href="#Utility-Changes">Utility Changes</a></li>
<li><a href="#Documentation-Changes">Documentation Changes</a></li>
<li><a href="#New-Diagnostics">New Diagnostics</a></li>
<li><a href="#Obsolete-Diagnostics">Obsolete Diagnostics</a></li>
<li><a href="#Configuration-Changes">Configuration Changes</a></li>
<li><a href="#BUGS">BUGS</a></li>
<li><a href="#SEE-ALSO">SEE ALSO</a></li>
<li><a href="#HISTORY">HISTORY</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>perl5005delta - what's new for perl5.005</p>
<h1 id="DESCRIPTION">DESCRIPTION</h1>
<p>This document describes differences between the 5.004 release and this one.</p>
<h1 id="About-the-new-versioning-system">About the new versioning system</h1>
<p>Perl is now developed on two tracks: a maintenance track that makes small, safe updates to released production versions with emphasis on compatibility; and a development track that pursues more aggressive evolution. Maintenance releases (which should be considered production quality) have subversion numbers that run from <code>1</code> to <code>49</code>, and development releases (which should be considered "alpha" quality) run from <code>50</code> to <code>99</code>.</p>
<p>Perl 5.005 is the combined product of the new dual-track development scheme.</p>
<h1 id="Incompatible-Changes">Incompatible Changes</h1>
<h2 id="WARNING:-This-version-is-not-binary-compatible-with-Perl-5.004">WARNING: This version is not binary compatible with Perl 5.004.</h2>
<p>Starting with Perl 5.004_50 there were many deep and far-reaching changes to the language internals. If you have dynamically loaded extensions that you built under perl 5.003 or 5.004, you can continue to use them with 5.004, but you will need to rebuild and reinstall those extensions to use them 5.005. See <i>INSTALL</i> for detailed instructions on how to upgrade.</p>
<h2 id="Default-installation-structure-has-changed">Default installation structure has changed</h2>
<p>The new Configure defaults are designed to allow a smooth upgrade from 5.004 to 5.005, but you should read <i>INSTALL</i> for a detailed discussion of the changes in order to adapt them to your system.</p>
<h2 id="Perl-Source-Compatibility">Perl Source Compatibility</h2>
<p>When none of the experimental features are enabled, there should be very few user-visible Perl source compatibility issues.</p>
<p>If threads are enabled, then some caveats apply. <code>@_</code> and <code>$_</code> become lexical variables. The effect of this should be largely transparent to the user, but there are some boundary conditions under which user will need to be aware of the issues. For example, <code>local(@_)</code> results in a "Can't localize lexical variable @_ ..." message. This may be enabled in a future version.</p>
<p>Some new keywords have been introduced. These are generally expected to have very little impact on compatibility. See <a href="#New-INIT-keyword">"New <code>INIT</code> keyword"</a>, <a href="#New-lock-keyword">"New <code>lock</code> keyword"</a>, and <a href="#New-qr-operator">"New <code>qr//</code> operator"</a>.</p>
<p>Certain barewords are now reserved. Use of these will provoke a warning if you have asked for them with the <code>-w</code> switch. See <a href="#our-is-now-a-reserved-word">"<code>our</code> is now a reserved word"</a>.</p>
<h2 id="C-Source-Compatibility">C Source Compatibility</h2>
<p>There have been a large number of changes in the internals to support the new features in this release.</p>
<ul>
<li><p>Core sources now require ANSI C compiler</p>
<p>An ANSI C compiler is now <b>required</b> to build perl. See <i>INSTALL</i>.</p>
</li>
<li><p>All Perl global variables must now be referenced with an explicit prefix</p>
<p>All Perl global variables that are visible for use by extensions now have a <code>PL_</code> prefix. New extensions should <code>not</code> refer to perl globals by their unqualified names. To preserve sanity, we provide limited backward compatibility for globals that are being widely used like <code>sv_undef</code> and <code>na</code> (which should now be written as <code>PL_sv_undef</code>, <code>PL_na</code> etc.)</p>
<p>If you find that your XS extension does not compile anymore because a perl global is not visible, try adding a <code>PL_</code> prefix to the global and rebuild.</p>
<p>It is strongly recommended that all functions in the Perl API that don't begin with <code>perl</code> be referenced with a <code>Perl_</code> prefix. The bare function names without the <code>Perl_</code> prefix are supported with macros, but this support may cease in a future release.</p>
<p>See <a href="/cperl/perlapi.html">perlapi</a>.</p>
</li>
<li><p>Enabling threads has source compatibility issues</p>
<p>Perl built with threading enabled requires extensions to use the new <code>dTHR</code> macro to initialize the handle to access per-thread data. If you see a compiler error that talks about the variable <code>thr</code> not being declared (when building a module that has XS code), you need to add <code>dTHR;</code> at the beginning of the block that elicited the error.</p>
<p>The API function <code>perl_get_sv("@",GV_ADD)</code> should be used instead of directly accessing perl globals as <code>GvSV(errgv)</code>. The API call is backward compatible with existing perls and provides source compatibility with threading is enabled.</p>
<p>See <a href="#C-Source-Compatibility">"C Source Compatibility"</a> for more information.</p>
</li>
</ul>
<h2 id="Binary-Compatibility">Binary Compatibility</h2>
<p>This version is NOT binary compatible with older versions. All extensions will need to be recompiled. Further binaries built with threads enabled are incompatible with binaries built without. This should largely be transparent to the user, as all binary incompatible configurations have their own unique architecture name, and extension binaries get installed at unique locations. This allows coexistence of several configurations in the same directory hierarchy. See <i>INSTALL</i>.</p>
<h2 id="Security-fixes-may-affect-compatibility">Security fixes may affect compatibility</h2>
<p>A few taint leaks and taint omissions have been corrected. This may lead to "failure" of scripts that used to work with older versions. Compiling with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes to the tainting behavior. But note that the resulting perl will have known insecurities.</p>
<p>Oneliners with the <code>-e</code> switch do not create temporary files anymore.</p>
<h2 id="Relaxed-new-mandatory-warnings-introduced-in-5.004">Relaxed new mandatory warnings introduced in 5.004</h2>
<p>Many new warnings that were introduced in 5.004 have been made optional. Some of these warnings are still present, but perl's new features make them less often a problem. See <a href="#New-Diagnostics">"New Diagnostics"</a>.</p>
<h2 id="Licensing">Licensing</h2>
<p>Perl has a new Social Contract for contributors. See <i>Porting/Contract</i>.</p>
<p>The license included in much of the Perl documentation has changed. Most of the Perl documentation was previously under the implicit GNU General Public License or the Artistic License (at the user's choice). Now much of the documentation unambiguously states the terms under which it may be distributed. Those terms are in general much less restrictive than the GNU GPL. See <a href="/cperl/perl.html">perl</a> and the individual perl manpages listed therein.</p>
<h1 id="Core-Changes">Core Changes</h1>
<h2 id="Threads">Threads</h2>
<p>WARNING: Threading is considered an <b>experimental</b> feature. Details of the implementation may change without notice. There are known limitations and some bugs. These are expected to be fixed in future versions.</p>
<p>See <i>README.threads</i>.</p>
<h2 id="Compiler">Compiler</h2>
<p>WARNING: The Compiler and related tools are considered <b>experimental</b>. Features may change without notice, and there are known limitations and bugs. Since the compiler is fully external to perl, the default configuration will build and install it.</p>
<p>The Compiler produces three different types of transformations of a perl program. The C backend generates C code that captures perl's state just before execution begins. It eliminates the compile-time overheads of the regular perl interpreter, but the run-time performance remains comparatively the same. The CC backend generates optimized C code equivalent to the code path at run-time. The CC backend has greater potential for big optimizations, but only a few optimizations are implemented currently. The Bytecode backend generates a platform independent bytecode representation of the interpreter's state just before execution. Thus, the Bytecode back end also eliminates much of the compilation overhead of the interpreter.</p>
<p>The compiler comes with several valuable utilities.</p>
<p><code>B::Lint</code> is an experimental module to detect and warn about suspicious code, especially the cases that the <code>-w</code> switch does not detect.</p>
<p><code>B::Deparse</code> can be used to demystify perl code, and understand how perl optimizes certain constructs.</p>
<p><code>B::Xref</code> generates cross reference reports of all definition and use of variables, subroutines and formats in a program.</p>
<p><code>B::Showlex</code> show the lexical variables used by a subroutine or file at a glance.</p>
<p><code>perlcc</code> is a simple frontend for compiling perl.</p>
<p>See <code>ext/B/README</code>, <a href="/cperl/lib/B.html">B</a>, and the respective compiler modules.</p>
<h2 id="Regular-Expressions">Regular Expressions</h2>
<p>Perl's regular expression engine has been seriously overhauled, and many new constructs are supported. Several bugs have been fixed.</p>
<p>Here is an itemized summary:</p>
<dl>
<dt id="Many-new-and-improved-optimizations">Many new and improved optimizations</dt>
<dd>
<p>Changes in the RE engine:</p>
<pre><code> Unneeded nodes removed;
Substrings merged together;
New types of nodes to process (SUBEXPR)* and similar expressions
quickly, used if the SUBEXPR has no side effects and matches
strings of the same length;
Better optimizations by lookup for constant substrings;
Better search for constants substrings anchored by $ ;</code></pre>
<p>Changes in Perl code using RE engine:</p>
<pre><code> More optimizations to s/longer/short/;
study() was not working;
/blah/ may be optimized to an analogue of index() if $& $` $' not seen;
Unneeded copying of matched-against string removed;
Only matched part of the string is copying if $` $' were not seen;</code></pre>
</dd>
<dt id="Many-bug-fixes">Many bug fixes</dt>
<dd>
<p>Note that only the major bug fixes are listed here. See <i>Changes</i> for others.</p>
<pre><code> Backtracking might not restore start of $3.
No feedback if max count for * or + on "complex" subexpression
was reached, similarly (but at compile time) for {3,34567}
Primitive restrictions on max count introduced to decrease a
possibility of a segfault;
(ZERO-LENGTH)* could segfault;
(ZERO-LENGTH)* was prohibited;
Long REs were not allowed;
/RE/g could skip matches at the same position after a
zero-length match;</code></pre>
</dd>
<dt id="New-regular-expression-constructs">New regular expression constructs</dt>
<dd>
<p>The following new syntax elements are supported:</p>
<pre><code> (?<=RE)
(?<!RE)
(?{ CODE })
(?i-x)
(?i:RE)
(?(COND)YES_RE|NO_RE)
(?>RE)
\z</code></pre>
</dd>
<dt id="New-operator-for-precompiled-regular-expressions">New operator for precompiled regular expressions</dt>
<dd>
<p>See <a href="#New-qr-operator">"New <code>qr//</code> operator"</a>.</p>
</dd>
<dt id="Other-improvements">Other improvements</dt>
<dd>
<pre><code> Better debugging output (possibly with colors),
even from non-debugging Perl;
RE engine code now looks like C, not like assembler;
Behaviour of RE modifiable by `use re' directive;
Improved documentation;
Test suite significantly extended;
Syntax [:^upper:] etc., reserved inside character classes;</code></pre>
</dd>
<dt id="Incompatible-changes">Incompatible changes</dt>
<dd>
<pre><code> (?i) localized inside enclosing group;
$( is not interpolated into RE any more;
/RE/g may match at the same position (with non-zero length)
after a zero-length match (bug fix).</code></pre>
</dd>
</dl>
<p>See <a href="/cperl/perlre.html">perlre</a> and <a href="/cperl/perlop.html">perlop</a>.</p>
<h2 id="Improved-malloc">Improved malloc()</h2>
<p>See banner at the beginning of <code>malloc.c</code> for details.</p>
<h2 id="Quicksort-is-internally-implemented">Quicksort is internally implemented</h2>
<p>Perl now contains its own highly optimized qsort() routine. The new qsort() is resistant to inconsistent comparison functions, so Perl's <code>sort()</code> will not provoke coredumps any more when given poorly written sort subroutines. (Some C library <code>qsort()</code>s that were being used before used to have this problem.) In our testing, the new <code>qsort()</code> required the minimal number of pair-wise compares on average, among all known <code>qsort()</code> implementations.</p>
<p>See <code>perlfunc/sort</code>.</p>
<h2 id="Reliable-signals">Reliable signals</h2>
<p>Perl's signal handling is susceptible to random crashes, because signals arrive asynchronously, and the Perl runtime is not reentrant at arbitrary times.</p>
<p>However, one experimental implementation of reliable signals is available when threads are enabled. See <code>Thread::Signal</code>. Also see <i>INSTALL</i> for how to build a Perl capable of threads.</p>
<h2 id="Reliable-stack-pointers">Reliable stack pointers</h2>
<p>The internals now reallocate the perl stack only at predictable times. In particular, magic calls never trigger reallocations of the stack, because all reentrancy of the runtime is handled using a "stack of stacks". This should improve reliability of cached stack pointers in the internals and in XSUBs.</p>
<h2 id="More-generous-treatment-of-carriage-returns">More generous treatment of carriage returns</h2>
<p>Perl used to complain if it encountered literal carriage returns in scripts. Now they are mostly treated like whitespace within program text. Inside string literals and here documents, literal carriage returns are ignored if they occur paired with linefeeds, or get interpreted as whitespace if they stand alone. This behavior means that literal carriage returns in files should be avoided. You can get the older, more compatible (but less generous) behavior by defining the preprocessor symbol <code>PERL_STRICT_CR</code> when building perl. Of course, all this has nothing whatever to do with how escapes like <code>\r</code> are handled within strings.</p>
<p>Note that this doesn't somehow magically allow you to keep all text files in DOS format. The generous treatment only applies to files that perl itself parses. If your C compiler doesn't allow carriage returns in files, you may still be unable to build modules that need a C compiler.</p>
<h2 id="Memory-leaks">Memory leaks</h2>
<p><code>substr</code>, <code>pos</code> and <code>vec</code> don't leak memory anymore when used in lvalue context. Many small leaks that impacted applications that embed multiple interpreters have been fixed.</p>
<h2 id="Better-support-for-multiple-interpreters">Better support for multiple interpreters</h2>
<p>The build-time option <code>-DMULTIPLICITY</code> has had many of the details reworked. Some previously global variables that should have been per-interpreter now are. With care, this allows interpreters to call each other. See the <code>PerlInterp</code> extension on CPAN.</p>
<h2 id="Behavior-of-local-on-array-and-hash-elements-is-now-well-defined">Behavior of local() on array and hash elements is now well-defined</h2>
<p>See <a href="/cperl/perlsub.html#Temporary-Values-via-local">"Temporary Values via local()" in perlsub</a>.</p>
<h2 id="is-transparently-tied-to-the-Errno-module"><code>%!</code> is transparently tied to the <a href="/cperl/lib/Errno.html">Errno</a> module</h2>
<p>See <a href="/cperl/perlvar.html">perlvar</a>, and <a href="/cperl/lib/Errno.html">Errno</a>.</p>
<h2 id="Pseudo-hashes-are-supported">Pseudo-hashes are supported</h2>
<p>See <a href="/cperl/perlref.html">perlref</a>.</p>
<h2 id="EXPR-foreach-EXPR-is-supported"><code>EXPR foreach EXPR</code> is supported</h2>
<p>See <a href="/cperl/perlsyn.html">perlsyn</a>.</p>
<h2 id="Keywords-can-be-globally-overridden">Keywords can be globally overridden</h2>
<p>See <a href="/cperl/perlsub.html">perlsub</a>.</p>
<h2 id="E-is-meaningful-on-Win32"><code>$^E</code> is meaningful on Win32</h2>
<p>See <a href="/cperl/perlvar.html">perlvar</a>.</p>
<h2 id="foreach-1..1000000-optimized"><code>foreach (1..1000000)</code> optimized</h2>
<p><code>foreach (1..1000000)</code> is now optimized into a counting loop. It does not try to allocate a 1000000-size list anymore.</p>
<h2 id="Foo::-can-be-used-as-implicitly-quoted-package-name"><code>Foo::</code> can be used as implicitly quoted package name</h2>
<p>Barewords caused unintuitive behavior when a subroutine with the same name as a package happened to be defined. Thus, <code>new Foo @args</code>, use the result of the call to <code>Foo()</code> instead of <code>Foo</code> being treated as a literal. The recommended way to write barewords in the indirect object slot is <code>new Foo:: @args</code>. Note that the method <code>new()</code> is called with a first argument of <code>Foo</code>, not <code>Foo::</code> when you do that.</p>
<h2 id="exists-Foo::-Bar::-tests-existence-of-a-package"><code>exists $Foo::{Bar::}</code> tests existence of a package</h2>
<p>It was impossible to test for the existence of a package without actually creating it before. Now <code>exists $Foo::{Bar::}</code> can be used to test if the <code>Foo::Bar</code> namespace has been created.</p>
<h2 id="Better-locale-support">Better locale support</h2>
<p>See <a href="/cperl/perllocale.html">perllocale</a>.</p>
<h2 id="Experimental-support-for-64-bit-platforms">Experimental support for 64-bit platforms</h2>
<p>Perl5 has always had 64-bit support on systems with 64-bit longs. Starting with 5.005, the beginnings of experimental support for systems with 32-bit long and 64-bit 'long long' integers has been added. If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually define it in perl.h) then perl will be built with 'long long' support. There will be many compiler warnings, and the resultant perl may not work on all systems. There are many other issues related to third-party extensions and libraries. This option exists to allow people to work on those issues.</p>
<h2 id="prototype-returns-useful-results-on-builtins">prototype() returns useful results on builtins</h2>
<p>See <a href="/cperl/perlfunc.html#prototype">"prototype" in perlfunc</a>.</p>
<h2 id="Extended-support-for-exception-handling">Extended support for exception handling</h2>
<p><code>die()</code> now accepts a reference value, and <code>$@</code> gets set to that value in exception traps. This makes it possible to propagate exception objects. This is an undocumented <b>experimental</b> feature.</p>
<h2 id="Re-blessing-in-DESTROY-supported-for-chaining-DESTROY-methods">Re-blessing in DESTROY() supported for chaining DESTROY() methods</h2>
<p>See <a href="/cperl/perlobj.html#Destructors">"Destructors" in perlobj</a>.</p>
<h2 id="All-printf-format-conversions-are-handled-internally">All <code>printf</code> format conversions are handled internally</h2>
<p>See <a href="/cperl/perlfunc.html#printf">"printf" in perlfunc</a>.</p>
<h2 id="New-INIT-keyword">New <code>INIT</code> keyword</h2>
<p><code>INIT</code> subs are like <code>BEGIN</code> and <code>END</code>, but they get run just before the perl runtime begins execution. e.g., the Perl Compiler makes use of <code>INIT</code> blocks to initialize and resolve pointers to XSUBs.</p>
<h2 id="New-lock-keyword">New <code>lock</code> keyword</h2>
<p>The <code>lock</code> keyword is the fundamental synchronization primitive in threaded perl. When threads are not enabled, it is currently a noop.</p>
<p>To minimize impact on source compatibility this keyword is "weak", i.e., any user-defined subroutine of the same name overrides it, unless a <code>use Thread</code> has been seen.</p>
<h2 id="New-qr-operator">New <code>qr//</code> operator</h2>
<p>The <code>qr//</code> operator, which is syntactically similar to the other quote-like operators, is used to create precompiled regular expressions. This compiled form can now be explicitly passed around in variables, and interpolated in other regular expressions. See <a href="/cperl/perlop.html">perlop</a>.</p>
<h2 id="our-is-now-a-reserved-word"><code>our</code> is now a reserved word</h2>
<p>Calling a subroutine with the name <code>our</code> will now provoke a warning when using the <code>-w</code> switch.</p>
<h2 id="Tied-arrays-are-now-fully-supported">Tied arrays are now fully supported</h2>
<p>See <a href="/cperl/lib/Tie/Array.html">Tie::Array</a>.</p>
<h2 id="Tied-handles-support-is-better">Tied handles support is better</h2>
<p>Several missing hooks have been added. There is also a new base class for TIEARRAY implementations. See <a href="/cperl/lib/Tie/Array.html">Tie::Array</a>.</p>
<h2 id="th-argument-to-substr">4th argument to substr</h2>
<p>substr() can now both return and replace in one operation. The optional 4th argument is the replacement string. See <a href="/cperl/perlfunc.html#substr">"substr" in perlfunc</a>.</p>
<h2 id="Negative-LENGTH-argument-to-splice">Negative LENGTH argument to splice</h2>
<p>splice() with a negative LENGTH argument now work similar to what the LENGTH did for substr(). Previously a negative LENGTH was treated as 0. See <a href="/cperl/perlfunc.html#splice">"splice" in perlfunc</a>.</p>
<h2 id="Magic-lvalues-are-now-more-magical">Magic lvalues are now more magical</h2>
<p>When you say something like <code>substr($x, 5) = "hi"</code>, the scalar returned by substr() is special, in that any modifications to it affect $x. (This is called a 'magic lvalue' because an 'lvalue' is something on the left side of an assignment.) Normally, this is exactly what you would expect to happen, but Perl uses the same magic if you use substr(), pos(), or vec() in a context where they might be modified, like taking a reference with <code>\</code> or as an argument to a sub that modifies <code>@_</code>. In previous versions, this 'magic' only went one way, but now changes to the scalar the magic refers to ($x in the above example) affect the magic lvalue too. For instance, this code now acts differently:</p>
<pre><code> $x = "hello";
sub printit {
$x = "g'bye";
print $_[0], "\n";
}
printit(substr($x, 0, 5));</code></pre>
<p>In previous versions, this would print "hello", but it now prints "g'bye".</p>
<h2 id="now-reads-in-records"><> now reads in records</h2>
<p>If <code>$/</code> is a reference to an integer, or a scalar that holds an integer, <> will read in records instead of lines. For more info, see <a href="/cperl/perlvar.html#pod">"$/" in perlvar</a>.</p>
<h1 id="Supported-Platforms">Supported Platforms</h1>
<p>Configure has many incremental improvements. Site-wide policy for building perl can now be made persistent, via Policy.sh. Configure also records the command-line arguments used in <i>config.sh</i>.</p>
<h2 id="New-Platforms">New Platforms</h2>
<p>BeOS is now supported. See <i>README.beos</i>.</p>
<p>DOS is now supported under the DJGPP tools. See <i>README.dos</i> (installed as <a href="/cperl/perldos.html">perldos</a> on some systems).</p>
<p>MiNT is now supported. See <i>README.mint</i>.</p>
<p>MPE/iX is now supported. See README.mpeix.</p>
<p>MVS (aka OS390, aka Open Edition) is now supported. See <i>README.os390</i> (installed as <a href="/cperl/perlos390.html">perlos390</a> on some systems).</p>
<p>Stratus VOS is now supported. See <i>README.vos</i>.</p>
<h2 id="Changes-in-existing-support">Changes in existing support</h2>
<p>Win32 support has been vastly enhanced. Support for Perl Object, a C++ encapsulation of Perl. GCC and EGCS are now supported on Win32. See <i>README.win32</i>, aka <a href="/cperl/perlwin32.html">perlwin32</a>.</p>
<p>VMS configuration system has been rewritten. See <i>README.vms</i> (installed as <i>README_vms</i> on some systems).</p>
<p>The hints files for most Unix platforms have seen incremental improvements.</p>
<h1 id="Modules-and-Pragmata">Modules and Pragmata</h1>
<h2 id="New-Modules">New Modules</h2>
<dl>
<dt id="B">B</dt>
<dd>
<p>Perl compiler and tools. See <a href="/cperl/lib/B.html">B</a>.</p>
</dd>
<dt id="Data::Dumper">Data::Dumper</dt>
<dd>
<p>A module to pretty print Perl data. See <a href="/cperl/lib/Data/Dumper.html">Data::Dumper</a>.</p>
</dd>
<dt id="Dumpvalue">Dumpvalue</dt>
<dd>
<p>A module to dump perl values to the screen. See <a href="/cperl/lib/Dumpvalue.html">Dumpvalue</a>.</p>
</dd>
<dt id="Errno">Errno</dt>
<dd>
<p>A module to look up errors more conveniently. See <a href="/cperl/lib/Errno.html">Errno</a>.</p>
</dd>
<dt id="File::Spec">File::Spec</dt>
<dd>
<p>A portable API for file operations.</p>
</dd>
<dt id="ExtUtils::Installed">ExtUtils::Installed</dt>
<dd>
<p>Query and manage installed modules.</p>
</dd>
<dt id="ExtUtils::Packlist">ExtUtils::Packlist</dt>
<dd>
<p>Manipulate .packlist files.</p>
</dd>
<dt id="Fatal">Fatal</dt>
<dd>
<p>Make functions/builtins succeed or die.</p>
</dd>
<dt id="IPC::SysV">IPC::SysV</dt>
<dd>
<p>Constants and other support infrastructure for System V IPC operations in perl.</p>
</dd>
<dt id="Test">Test</dt>
<dd>
<p>A framework for writing test suites.</p>
</dd>
<dt id="Tie::Array">Tie::Array</dt>
<dd>
<p>Base class for tied arrays.</p>
</dd>
<dt id="Tie::Handle">Tie::Handle</dt>
<dd>
<p>Base class for tied handles.</p>
</dd>
<dt id="Thread">Thread</dt>
<dd>
<p>Perl thread creation, manipulation, and support.</p>
</dd>
<dt id="attrs">attrs</dt>
<dd>
<p>Set subroutine attributes.</p>
</dd>
<dt id="fields">fields</dt>
<dd>
<p>Compile-time class fields.</p>
</dd>
<dt id="re">re</dt>
<dd>
<p>Various pragmata to control behavior of regular expressions.</p>
</dd>
</dl>
<h2 id="Changes-in-existing-modules">Changes in existing modules</h2>
<dl>
<dt id="Benchmark">Benchmark</dt>
<dd>
<p>You can now run tests for <i>x</i> seconds instead of guessing the right number of tests to run.</p>
<p>Keeps better time.</p>
</dd>
<dt id="Carp">Carp</dt>
<dd>
<p>Carp has a new function cluck(). cluck() warns, like carp(), but also adds a stack backtrace to the error message, like confess().</p>
</dd>
<dt id="CGI">CGI</dt>
<dd>
<p>CGI has been updated to version 2.42.</p>
</dd>
<dt id="Fcntl">Fcntl</dt>
<dd>
<p>More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for large (more than 4G) file access (the 64-bit support is not yet working, though, so no need to get overly excited), Free/Net/OpenBSD locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR.</p>
</dd>
<dt id="Math::Complex">Math::Complex</dt>
<dd>
<p>The accessors methods Re, Im, arg, abs, rho, theta, methods can ($z->Re()) now also act as mutators ($z->Re(3)).</p>
</dd>
<dt id="Math::Trig">Math::Trig</dt>
<dd>
<p>A little bit of radial trigonometry (cylindrical and spherical) added, for example the great circle distance.</p>
</dd>
<dt id="POSIX">POSIX</dt>
<dd>
<p>POSIX now has its own platform-specific hints files.</p>
</dd>
<dt id="DB_File">DB_File</dt>
<dd>
<p>DB_File supports version 2.x of Berkeley DB. See <code>ext/DB_File/Changes</code>.</p>
</dd>
<dt id="MakeMaker">MakeMaker</dt>
<dd>
<p>MakeMaker now supports writing empty makefiles, provides a way to specify that site umask() policy should be honored. There is also better support for manipulation of .packlist files, and getting information about installed modules.</p>
<p>Extensions that have both architecture-dependent and architecture-independent files are now always installed completely in the architecture-dependent locations. Previously, the shareable parts were shared both across architectures and across perl versions and were therefore liable to be overwritten with newer versions that might have subtle incompatibilities.</p>
</dd>
<dt id="CPAN">CPAN</dt>
<dd>
<p>See <a href="/cperl/perlmodinstall.html">perlmodinstall</a> and <a href="/cperl/lib/CPAN.html">CPAN</a>.</p>
</dd>
<dt id="Cwd">Cwd</dt>
<dd>
<p>Cwd::cwd is faster on most platforms.</p>
</dd>
</dl>
<h1 id="Utility-Changes">Utility Changes</h1>
<p><code>h2ph</code> and related utilities have been vastly overhauled.</p>
<p><code>perlcc</code>, a new experimental front end for the compiler is available.</p>
<p>The crude GNU <code>configure</code> emulator is now called <code>configure.gnu</code> to avoid trampling on <code>Configure</code> under case-insensitive filesystems.</p>
<p><code>perldoc</code> used to be rather slow. The slower features are now optional. In particular, case-insensitive searches need the <code>-i</code> switch, and recursive searches need <code>-r</code>. You can set these switches in the <code>PERLDOC</code> environment variable to get the old behavior.</p>
<h1 id="Documentation-Changes">Documentation Changes</h1>
<p>Config.pm now has a glossary of variables.</p>
<p><i>Porting/patching.pod</i> has detailed instructions on how to create and submit patches for perl.</p>
<p><a href="/cperl/perlport.html">perlport</a> specifies guidelines on how to write portably.</p>
<p><a href="/cperl/perlmodinstall.html">perlmodinstall</a> describes how to fetch and install modules from <code>CPAN</code> sites.</p>
<p>Some more Perl traps are documented now. See <a href="/cperl/perltrap.html">perltrap</a>.</p>
<p><a href="/cperl/perlopentut.html">perlopentut</a> gives a tutorial on using open().</p>
<p><a href="/cperl/perlreftut.html">perlreftut</a> gives a tutorial on references.</p>
<p><a href="/cperl/perlthrtut.html">perlthrtut</a> gives a tutorial on threads.</p>
<h1 id="New-Diagnostics">New Diagnostics</h1>
<dl>
<dt id="Ambiguous-call-resolved-as-CORE::-s-qualify-as-such-or-use">Ambiguous call resolved as CORE::%s(), qualify as such or use &</dt>
<dd>
<p>(W) A subroutine you have declared has the same name as a Perl keyword, and you have used the name without qualification for calling one or the other. Perl decided to call the builtin because the subroutine is not imported.</p>
<p>To force interpretation as a subroutine call, either put an ampersand before the subroutine name, or qualify the name with its package. Alternatively, you can import the subroutine (or pretend that it's imported with the <code>use subs</code> pragma).</p>
<p>To silently interpret it as the Perl operator, use the <code>CORE::</code> prefix on the operator (e.g. <code>CORE::log($x)</code>) or by declaring the subroutine to be an object method (see <a href="#attrs">"attrs"</a>).</p>
</dd>
<dt id="Bad-index-while-coercing-array-into-hash">Bad index while coercing array into hash</dt>
<dd>
<p>(F) The index looked up in the hash found as the 0'th element of a pseudo-hash is not legal. Index values must be at 1 or greater. See <a href="/cperl/perlref.html">perlref</a>.</p>
</dd>
<dt id="Bareword-s-refers-to-nonexistent-package">Bareword "%s" refers to nonexistent package</dt>
<dd>
<p>(W) You used a qualified bareword of the form <code>Foo::</code>, but the compiler saw no other uses of that namespace before that point. Perhaps you need to predeclare a package?</p>
</dd>
<dt id="Cant-call-method-s-on-an-undefined-value">Can't call method "%s" on an undefined value</dt>
<dd>
<p>(F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error:</p>
<pre><code> $BADREF = 42;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);</code></pre>
</dd>
<dt id="Cant-check-filesystem-of-script-s-for-nosuid">Can't check filesystem of script "%s" for nosuid</dt>
<dd>
<p>(P) For some reason you can't check the filesystem of the script for nosuid.</p>
</dd>
<dt id="Cant-coerce-array-into-hash">Can't coerce array into hash</dt>
<dd>
<p>(F) You used an array where a hash was expected, but the array has no information on how to map from keys to array indices. You can do that only with arrays that have a hash reference at index 0.</p>
</dd>
<dt id="Cant-goto-subroutine-from-an-eval-string">Can't goto subroutine from an eval-string</dt>
<dd>
<p>(F) The "goto subroutine" call can't be used to jump out of an eval "string". (You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)</p>
</dd>
<dt id="Cant-localize-pseudo-hash-element">Can't localize pseudo-hash element</dt>
<dd>
<p>(F) You said something like <code>local $ar->{'key'}</code>, where $ar is a reference to a pseudo-hash. That hasn't been implemented yet, but you can get a similar effect by localizing the corresponding array element directly: <code>local $ar->[$ar->[0]{'key'}]</code>.</p>
</dd>
<dt id="Cant-use-because-Errno.pm-is-not-available">Can't use %%! because Errno.pm is not available</dt>
<dd>
<p>(F) The first time the %! hash is used, perl automatically loads the Errno.pm module. The Errno module is expected to tie the %! hash to provide symbolic names for <code>$!</code> errno values.</p>
</dd>
<dt id="Cannot-find-an-opnumber-for-s">Cannot find an opnumber for "%s"</dt>
<dd>
<p>(F) A string of a form <code>CORE::word</code> was given to prototype(), but there is no builtin with the name <code>word</code>.</p>
</dd>
<dt id="Character-class-syntax-.-.-is-reserved-for-future-extensions">Character class syntax [. .] is reserved for future extensions</dt>
<dd>
<p>(W) Within regular expression character classes ([]) the syntax beginning with "[." and ending with ".]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[." and ".\]".</p>
</dd>
<dt id="Character-class-syntax-:-:-is-reserved-for-future-extensions">Character class syntax [: :] is reserved for future extensions</dt>
<dd>
<p>(W) Within regular expression character classes ([]) the syntax beginning with "[:" and ending with ":]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[:" and ":\]".</p>
</dd>
<dt id="Character-class-syntax-is-reserved-for-future-extensions">Character class syntax [= =] is reserved for future extensions</dt>
<dd>
<p>(W) Within regular expression character classes ([]) the syntax beginning with "[=" and ending with "=]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[=" and "=\]".</p>
</dd>
<dt id="s:-Eval-group-in-insecure-regular-expression">%s: Eval-group in insecure regular expression</dt>
<dd>
<p>(F) Perl detected tainted data when trying to compile a regular expression that contains the <code>(?{ ... })</code> zero-width assertion, which is unsafe. See <a href="/cperl/perlre.html#code">"(?{ code })" in perlre</a>, and <a href="/cperl/perlsec.html">perlsec</a>.</p>
</dd>
<dt id="s:-Eval-group-not-allowed-use-re-eval">%s: Eval-group not allowed, use re 'eval'</dt>
<dd>
<p>(F) A regular expression contained the <code>(?{ ... })</code> zero-width assertion, but that construct is only allowed when the <code>use re 'eval'</code> pragma is in effect. See <a href="/cperl/perlre.html#code">"(?{ code })" in perlre</a>.</p>
</dd>
<dt id="s:-Eval-group-not-allowed-at-run-time">%s: Eval-group not allowed at run time</dt>
<dd>
<p>(F) Perl tried to compile a regular expression containing the <code>(?{ ... })</code> zero-width assertion at run time, as it would when the pattern contains interpolated values. Since that is a security risk, it is not allowed. If you insist, you may still do this by explicitly building the pattern from an interpolated string at run time and using that in an eval(). See <a href="/cperl/perlre.html#code">"(?{ code })" in perlre</a>.</p>
</dd>
<dt id="Explicit-blessing-to-assuming-package-main">Explicit blessing to '' (assuming package main)</dt>
<dd>
<p>(W) You are blessing a reference to a zero length string. This has the effect of blessing the reference into the package main. This is usually not what you want. Consider providing a default target package, e.g. bless($ref, $p || 'MyPackage');</p>
</dd>
<dt id="Illegal-hex-digit-ignored">Illegal hex digit ignored</dt>
<dd>
<p>(W) You may have tried to use a character other than 0 - 9 or A - F in a hexadecimal number. Interpretation of the hexadecimal number stopped before the illegal character.</p>
</dd>
<dt id="No-such-array-field">No such array field</dt>
<dd>
<p>(F) You tried to access an array as a hash, but the field name used is not defined. The hash at index 0 should map all valid field names to array indices for that to work.</p>
</dd>
<dt id="No-such-field-s-in-variable-s-of-type-s">No such field "%s" in variable %s of type %s</dt>
<dd>
<p>(F) You tried to access a field of a typed variable where the type does not know about the field name. The field names are looked up in the %FIELDS hash in the type package at compile time. The %FIELDS hash is usually set up with the 'fields' pragma.</p>
</dd>
<dt id="Out-of-memory-during-ridiculously-large-request">Out of memory during ridiculously large request</dt>
<dd>
<p>(F) You can't allocate more than 2^31+"small amount" bytes. This error is most likely to be caused by a typo in the Perl program. e.g., <code>$arr[time]</code> instead of <code>$arr[$time]</code>.</p>
</dd>
<dt id="Range-iterator-outside-integer-range">Range iterator outside integer range</dt>
<dd>
<p>(F) One (or both) of the numeric arguments to the range operator ".." are outside the range which can be represented by integers internally. One possible workaround is to force Perl to use magical string increment by prepending "0" to your numbers.</p>
</dd>
<dt id="Recursive-inheritance-detected-while-looking-for-method-s-s">Recursive inheritance detected while looking for method '%s' %s</dt>
<dd>
<p>(F) More than 100 levels of inheritance were encountered while invoking a method. Probably indicates an unintended loop in your inheritance hierarchy.</p>
</dd>
<dt id="Reference-found-where-even-sized-list-expected">Reference found where even-sized list expected</dt>
<dd>
<p>(W) You gave a single reference where Perl was expecting a list with an even number of elements (for assignment to a hash). This usually means that you used the anon hash constructor when you meant to use parens. In any case, a hash requires key/value <b>pairs</b>.</p>
<pre><code> %hash = { one => 1, two => 2, }; # WRONG
%hash = [ qw/ an anon array / ]; # WRONG
%hash = ( one => 1, two => 2, ); # right
%hash = qw( one 1 two 2 ); # also fine</code></pre>
</dd>
<dt id="Undefined-value-assigned-to-typeglob">Undefined value assigned to typeglob</dt>
<dd>
<p>(W) An undefined value was assigned to a typeglob, a la <code>*foo = undef</code>. This does nothing. It's possible that you really mean <code>undef *foo</code>.</p>
</dd>
<dt id="Use-of-reserved-word-s-is-deprecated">Use of reserved word "%s" is deprecated</dt>
<dd>
<p>(D) The indicated bareword is a reserved word. Future versions of perl may use it as a keyword, so you're better off either explicitly quoting the word in a manner appropriate for its context of use, or using a different name altogether. The warning can be suppressed for subroutine names by either adding a <code>&</code> prefix, or using a package qualifier, e.g. <code>&our()</code>, or <code>Foo::our()</code>.</p>
</dd>
<dt id="perl:-warning:-Setting-locale-failed">perl: warning: Setting locale failed.</dt>
<dd>
<p>(S) The whole warning message will look something like:</p>
<pre><code> perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "En_US",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").</code></pre>
<p>Exactly what were the failed locale settings varies. In the above the settings were that the LC_ALL was "En_US" and the LANG had no value. This error means that Perl detected that you and/or your system administrator have set up the so-called variable system but Perl could not use those settings. This was not dead serious, fortunately: there is a "default locale" called "C" that Perl can and will use, the script will be run. Before you really fix the problem, however, you will get the same error message each time you run Perl. How to really fix the problem can be found in <a href="/cperl/perllocale.html#LOCALE-PROBLEMS">"LOCALE PROBLEMS" in perllocale</a>.</p>
</dd>
</dl>
<h1 id="Obsolete-Diagnostics">Obsolete Diagnostics</h1>
<dl>
<dt id="Cant-mktemp">Can't mktemp()</dt>
<dd>
<p>(F) The mktemp() routine failed for some reason while trying to process a <b>-e</b> switch. Maybe your /tmp partition is full, or clobbered.</p>
<p>Removed because <b>-e</b> doesn't use temporary files any more.</p>
</dd>
<dt id="Cant-write-to-temp-file-for--e:-s">Can't write to temp file for <b>-e</b>: %s</dt>
<dd>
<p>(F) The write routine failed for some reason while trying to process a <b>-e</b> switch. Maybe your /tmp partition is full, or clobbered.</p>
<p>Removed because <b>-e</b> doesn't use temporary files any more.</p>
</dd>
<dt id="Cannot-open-temporary-file">Cannot open temporary file</dt>
<dd>
<p>(F) The create routine failed for some reason while trying to process a <b>-e</b> switch. Maybe your /tmp partition is full, or clobbered.</p>
<p>Removed because <b>-e</b> doesn't use temporary files any more.</p>
</dd>
<dt id="regexp-too-big">regexp too big</dt>
<dd>
<p>(F) The current implementation of regular expressions uses shorts as address offsets within a string. Unfortunately this means that if the regular expression compiles to longer than 32767, it'll blow up. Usually when you want a regular expression this big, there is a better way to do it with multiple statements. See <a href="/cperl/perlre.html">perlre</a>.</p>
</dd>
</dl>
<h1 id="Configuration-Changes">Configuration Changes</h1>
<p>You can use "Configure -Uinstallusrbinperl" which causes installperl to skip installing perl also as /usr/bin/perl. This is useful if you prefer not to modify /usr/bin for some reason or another but harmful because many scripts assume to find Perl in /usr/bin/perl.</p>
<h1 id="BUGS">BUGS</h1>
<p>If you find what you think is a bug, you might check the headers of recently posted articles in the comp.lang.perl.misc newsgroup. There may also be information at http://www.perl.com/perl/ , the Perl Home Page.</p>
<p>If you believe you have an unreported bug, please run the <b>perlbug</b> program included with your release. Make sure you trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of <code>perl -V</code>, will be sent off to <<i>[email protected]</i>> to be analysed by the Perl porting team.</p>
<h1 id="SEE-ALSO">SEE ALSO</h1>
<p>The <i>Changes</i> file for exhaustive details on what changed.</p>
<p>The <i>INSTALL</i> file for how to build Perl.</p>
<p>The <i>README</i> file for general stuff.</p>
<p>The <i>Artistic</i> and <i>Copying</i> files for copyright information.</p>
<h1 id="HISTORY">HISTORY</h1>
<p>Written by Gurusamy Sarathy <<i>[email protected]</i>>, with many contributions from The Perl Porters.</p>
<p>Send omissions or corrections to <<i>[email protected]</i>>.</p>
</body>
</html>