File: perlhack.html

package info (click to toggle)
perl-doc-html 5.26.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 39,400 kB
  • sloc: xml: 36; makefile: 7
file content (1385 lines) | stat: -rw-r--r-- 73,636 bytes parent folder | download
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
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>perlhack - perldoc.perl.org</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="Content-Language" content="en-gb">
  <link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
  <link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
  <link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>

<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
    <div id="page">
      
      <div id="header">
	<div id="homepage_link">
	  <a href="index.html"></a>
	</div>
	<div id="strapline">
	  Perl Programming Documentation
	</div>
	<div id="download_link" class="download">
	  <a href="http://www.perl.org/get.html">Download Perl</a>
	</div>
	<div id="explore_link" class="download">
	  <a id="explore_anchor" href="#">Explore</a>
	</div>
      </div>
      
      <div id="body">
        <div id="left_column">
          <div class="side_group">
            
	    <div class="side_panel doc_panel">
              <p>Manual</p>
              <ul>
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">History / Changes</a>
                <li><a href="index-licence.html">License</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Reference</p>
              <ul>
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Special Variables</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platform Specific</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Modules</p>
              <ul>
		<li>
		
                
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		
                  
		
		
                    <a href="index-modules-A.html">A</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-B.html">B</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-C.html">C</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-D.html">D</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-E.html">E</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-F.html">F</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-G.html">G</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-H.html">H</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-I.html">I</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-L.html">L</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-M.html">M</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-N.html">N</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-O.html">O</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-P.html">P</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-S.html">S</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-T.html">T</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-U.html">U</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-X.html">X</a>
                    
                
              </ul>
            </div>
            
	      <div class="side_panel doc_panel">
		<p>Tools</p>
		<ul>
		  <li><a href="preferences.html">Preferences</a>
		</ul>
	      </div>
            
          </div>
        </div>
        <div id="centre_column">
          <div id="content_header">
            <div id="title_bar">
              <div id="page_name">
                <h1>perlhack</h1>
              </div>
              <div id="perl_version">
                Perl 5 version 26.0 documentation
              </div>
              <div class="page_links" id="page_links_top">
                <a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
		
              </div>
	      <div class="page_links" id="page_links_bottom">
		
                  <a href="#" id="page_index_toggle">Show page index</a> &bull;
		
                <a href="#" id="recent_pages_toggle">Show recent pages</a>		
	      </div>
	      <div id="search_form">
		<form action="search.html" method="GET" id="search">
		  <input type="text" name="q" id="search_box" alt="Search">
		</form>
	      </div>
            </div>
            <div id="breadcrumbs">
                
    <a href="index.html">Home</a> &gt;
    
      
        <a href="index-internals.html">Internals and C language interface</a> &gt;
      
    
    perlhack
  

            </div>
          </div>
          <div id="content_body">
	    <!--[if lt IE 7]>
 <div class="noscript">
   <p>
     <strong>It looks like you're using Internet Explorer 6. This is a very old
     browser which does not offer full support for modern websites.</strong>
   </p>
   <p>
     Unfortunately this means that this website will not work on
     your computer.
   </p>
   <p>
     Don't miss out though! To view the site (and get a better experience from
     many other websites), simply upgrade to
     <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
     or download an alternative browser such as
     <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
     <a href="http://www.apple.com/safari/download/">Safari</a>, or
     <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
   </p>
   <p>
     All of these browsers are free. If you're using a PC at work, you may
     need to contact your IT administrator.
   </p>
 </div>
<![endif]-->
	    <noscript>
	      <div class="noscript">
	      <p>
                <strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
	        or are running a non-JavaScript capable web browser.</strong>
	      </p>
	      <p>
		To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
              </p>
	      </div>
	    </noscript>

	    <div id="recent_pages" class="hud_container">
	      <div id="recent_pages_header" class="hud_header">
		<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
		<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
		<div id="recent_pages_topright" class="hud_topright"></div>
	      </div>
	      <div id="recent_pages_content" class="hud_content">
	      </div>
	      <div id="recent_pages_footer" class="hud_footer">
		<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
		<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
		<div id="recent_pages_resize" class="hud_resize"></div>
	      </div>
	    </div>
  
	    <div id="from_search"></div>
            <h1>perlhack</h1>


  <!--    -->
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#SUPER-QUICK-PATCH-GUIDE">SUPER QUICK PATCH GUIDE</a><li><a href="#BUG-REPORTING">BUG REPORTING</a><li><a href="#PERL-5-PORTERS">PERL 5 PORTERS</a><ul><li><a href="#perl-changes-mailing-list">perl-changes mailing list</a><li><a href="#%23p5p-on-IRC">#p5p on IRC</a></ul><li><a href="#GETTING-THE-PERL-SOURCE">GETTING THE PERL SOURCE</a><ul><li><a href="#Read-access-via-Git">Read access via Git</a><li><a href="#Read-access-via-the-web">Read access via the web</a><li><a href="#Read-access-via-rsync">Read access via rsync</a><li><a href="#Write-access-via-git">Write access via git</a></ul><li><a href="#PATCHING-PERL">PATCHING PERL</a><ul><li><a href="#Submitting-patches">Submitting patches</a><li><a href="#Getting-your-patch-accepted">Getting your patch accepted</a><li><a href="#Patching-a-core-module">Patching a core module</a><li><a href="#Updating-perldelta">Updating perldelta</a><li><a href="#What-makes-for-a-good-patch%3f">What makes for a good patch?</a></ul><li><a href="#TESTING">TESTING</a><ul><li><a href="#Special-make-test-targets">Special make test targets</a><li><a href="#Parallel-tests">Parallel tests</a><li><a href="#Running-tests-by-hand">Running tests by hand</a><li><a href="#Using-_t%2fharness_-for-testing">Using _t/harness_ for testing</a><li><a href="#Performance-testing">Performance testing</a></ul><li><a href="#MORE-READING-FOR-GUTS-HACKERS">MORE READING FOR GUTS HACKERS</a><li><a href="#CPAN-TESTERS-AND-PERL-SMOKERS">CPAN TESTERS AND PERL SMOKERS</a><li><a href="#WHAT-NEXT%3f">WHAT NEXT?</a><ul><li><a href="#%22The-Road-goes-ever-on-and-on%2c-down-from-the-door-where-it-began.%22">"The Road goes ever on and on, down from the door where it began."</a><li><a href="#Metaphoric-Quotations">Metaphoric Quotations</a></ul><li><a href="#AUTHOR">AUTHOR</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>perlhack - How to hack on Perl</p>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>This document explains how Perl development works.  It includes details
about the Perl 5 Porters email list, the Perl repository, the Perlbug
bug tracker, patch guidelines, and commentary on Perl development
philosophy.</p>
<a name="SUPER-QUICK-PATCH-GUIDE"></a><h1>SUPER QUICK PATCH GUIDE</h1>
<p>If you just want to submit a single small patch like a pod fix, a test
for a bug, comment fixes, etc., it's easy! Here's how:</p>
<ul>
<li><a name="*-Check-out-the-source-repository"></a><b>Check out the source repository</b>
<p>The perl source is in a git repository.  You can clone the repository
with the following command:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">clone</span> <span class="w">git</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>.<span class="w">git</span> <span class="w">perl</span></li></ol></pre></li>
<li><a name="*-Ensure-you're-following-the-latest-advice"></a><b>Ensure you're following the latest advice</b>
<p>In case the advice in this guide has been updated recently, read the
latest version directly from the perl source:</p>
<pre class="verbatim"><ol><li>  <span class="i">% perldoc</span> <span class="w">pod</span>/<span class="w">perlhack</span>.<span class="w">pod</span></li></ol></pre></li>
<li><a name="*-Make-your-change"></a><b>Make your change</b>
<p>Hack, hack, hack.  Keep in mind that Perl runs on many different
platforms, with different operating systems that have different
capabilities, different filesystem organizations, and even different
character sets.  <a href="perlhacktips.html">perlhacktips</a> gives advice on this.</p>
</li>
<li><a name="*-Test-your-change"></a><b>Test your change</b>
<p>You can run all the tests with the following commands:</p>
<pre class="verbatim"><ol><li>  <span class="i">% .</span>/<span class="w">Configure</span> -<span class="w">des</span> -<span class="w">Dusedevel</span></li><li>  % <span class="w">make</span> <span class="w">test</span></li></ol></pre><p>Keep hacking until the tests pass.</p>
</li>
<li><a name="*-Commit-your-change"></a><b>Commit your change</b>
<p>Committing your work will save the change <i>on your local system</i>:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">commit</span> -<span class="w">a</span> -<span class="q">m &#39;Commit message goes here&#39;</span></li></ol></pre><p>Make sure the commit message describes your change in a single
sentence.  For example, "Fixed spelling errors in perlhack.pod".</p>
</li>
<li><a name="*-Send-your-change-to-perlbug"></a><b>Send your change to perlbug</b>
<p>The next step is to submit your patch to the Perl core ticket system
via email.</p>
<p>If your changes are in a single git commit, run the following commands
to generate the patch file and attach it to your bug report:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> format-patch -1</li><li><span class="hh">  % ./perl -Ilib utils/perlbug -p 0001-*.patch</span></li></ol></pre><p>The perlbug program will ask you a few questions about your email
address and the patch you're submitting.  Once you've answered them it
will submit your patch via email.</p>
<p>If your changes are in multiple commits, generate a patch file for each
one and provide them to perlbug's <code class="inline">-p</code>
 option separated by commas:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> format-patch -3</li><li><span class="hh">  % ./perl -Ilib utils/perlbug -p 0001-fix1.patch,0002-fix2.patch,\</span></li><li><span class="hh">  &gt; 0003-fix3.patch</span></li></ol></pre><p>When prompted, pick a subject that summarizes your changes.</p>
</li>
<li><a name="*-Thank-you"></a><b>Thank you</b>
<p>The porters appreciate the time you spent helping to make Perl better.
Thank you!</p>
</li>
<li><a name="*-Next-time"></a><b>Next time</b>
<p>The next time you wish to make a patch, you need to start from the
latest perl in a pristine state.  Check you don't have any local changes
or added files in your perl check-out which you wish to keep, then run
these commands:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">pull</span></li><li>  % <span class="w">git</span> <a class="l_k" href="functions/reset.html">reset</a> --<span class="w">hard</span> <span class="w">origin</span>/<span class="w">blead</span></li><li>  % <span class="w">git</span> <span class="w">clean</span> -<span class="w">dxf</span></li></ol></pre></li>
</ul>
<a name="BUG-REPORTING"></a><h1>BUG REPORTING</h1>
<p>If you want to report a bug in Perl, you must use the <i>perlbug</i>
command line tool.  This tool will ensure that your bug report includes
all the relevant system and configuration information.</p>
<p>To browse existing Perl bugs and patches, you can use the web interface
at <a href="http://rt.perl.org/">http://rt.perl.org/</a>.</p>
<p>Please check the archive of the perl5-porters list (see below) and/or
the bug tracking system before submitting a bug report.  Often, you'll
find that the bug has been reported already.</p>
<p>You can log in to the bug tracking system and comment on existing bug
reports.  If you have additional information regarding an existing bug,
please add it.  This will help the porters fix the bug.</p>
<a name="PERL-5-PORTERS"></a><h1>PERL 5 PORTERS</h1>
<p>The perl5-porters (p5p) mailing list is where the Perl standard
distribution is maintained and developed.  The people who maintain Perl
are also referred to as the "Perl 5 Porters", "p5p" or just the
"porters".</p>
<p>A searchable archive of the list is available at
<a href="http://markmail.org/search/?q=perl5-porters">http://markmail.org/search/?q=perl5-porters</a>.  There is also an archive at
<a href="http://archive.develooper.com/perl5-porters@perl.org/">http://archive.develooper.com/perl5-porters@perl.org/</a>.</p>
<a name="perl-changes-mailing-list"></a><h2>perl-changes mailing list</h2>
<p>The perl5-changes mailing list receives a copy of each patch that gets
submitted to the maintenance and development branches of the perl
repository.  See <a href="http://lists.perl.org/list/perl5-changes.html">http://lists.perl.org/list/perl5-changes.html</a> for
subscription and archive information.</p>
<a name="%23p5p-on-IRC"></a><h2>#p5p on IRC</h2>
<p>Many porters are also active on the <a href="irc://irc.perl.org/#p5p">irc://irc.perl.org/#p5p</a> channel.
Feel free to join the channel and ask questions about hacking on the
Perl core.</p>
<a name="GETTING-THE-PERL-SOURCE"></a><h1>GETTING THE PERL SOURCE</h1>
<p>All of Perl's source code is kept centrally in a Git repository at
<i>perl5.git.perl.org</i>.  The repository contains many Perl revisions
from Perl 1 onwards and all the revisions from Perforce, the previous
version control system.</p>
<p>For much more detail on using git with the Perl repository, please see
<a href="perlgit.html">perlgit</a>.</p>
<a name="Read-access-via-Git"></a><h2>Read access via Git</h2>
<p>You will need a copy of Git for your computer.  You can fetch a copy of
the repository using the git protocol:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">clone</span> <span class="w">git</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>.<span class="w">git</span> <span class="w">perl</span></li></ol></pre><p>This clones the repository and makes a local copy in the <i>perl</i>
directory.</p>
<p>If you cannot use the git protocol for firewall reasons, you can also
clone via http, though this is much slower:</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">clone</span> <span class="w">http</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>.<span class="w">git</span> <span class="w">perl</span></li></ol></pre><a name="Read-access-via-the-web"></a><h2>Read access via the web</h2>
<p>You may access the repository over the web.  This allows you to browse
the tree, see recent commits, subscribe to RSS feeds for the changes,
search for particular commits and more.  You may access it at
<a href="http://perl5.git.perl.org/perl.git">http://perl5.git.perl.org/perl.git</a>.  A mirror of the repository is
found at <a href="https://github.com/Perl/perl5">https://github.com/Perl/perl5</a>.</p>
<a name="Read-access-via-rsync"></a><h2>Read access via rsync</h2>
<p>You can also choose to use rsync to get a copy of the current source
tree for the bleadperl branch and all maintenance branches:</p>
<pre class="verbatim"><ol><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="w">current</span> .</li><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="n">5.12</span>.<span class="w">x</span> .</li><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="n">5.10</span>.<span class="w">x</span> .</li><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="n">5.8</span>.<span class="w">x</span> .</li><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="n">5.6</span>.<span class="w">x</span> .</li><li>  <span class="i">% rsync</span> -<span class="w">avz</span> <span class="w">rsync</span><span class="co">:</span><span class="q">//perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">perl</span>-<span class="n">5.005</span><span class="w">xx</span> .</li></ol></pre><p>(Add the <code class="inline">--<a class="l_k" href="functions/delete.html">delete</a></code>
 option to remove leftover files.)</p>
<p>To get a full list of the available sync points:</p>
<pre class="verbatim"><ol><li>  <span class="i">% rsync</span> <span class="w">perl5</span>.<span class="w">git</span>.<span class="w">perl</span>.<span class="w">org::</span></li></ol></pre><a name="Write-access-via-git"></a><h2>Write access via git</h2>
<p>If you have a commit bit, please see <a href="perlgit.html">perlgit</a> for more details on
using git.</p>
<a name="PATCHING-PERL"></a><h1>PATCHING PERL</h1>
<p>If you're planning to do more extensive work than a single small fix,
we encourage you to read the documentation below.  This will help you
focus your work and make your patches easier to incorporate into the
Perl source.</p>
<a name="Submitting-patches"></a><h2>Submitting patches</h2>
<p>If you have a small patch to submit, please submit it via perlbug.  You
can also send email directly to perlbug@perl.org.  Please note that
messages sent to perlbug may be held in a moderation queue, so you
won't receive a response immediately.</p>
<p>You'll know your submission has been processed when you receive an
email from our ticket tracking system.  This email will give you a
ticket number.  Once your patch has made it to the ticket tracking
system, it will also be sent to the perl5-porters@perl.org list.</p>
<p>Patches are reviewed and discussed on the p5p list.  Simple,
uncontroversial patches will usually be applied without any discussion.
When the patch is applied, the ticket will be updated and you will
receive email.  In addition, an email will be sent to the p5p list.</p>
<p>In other cases, the patch will need more work or discussion.  That will
happen on the p5p list.</p>
<p>You are encouraged to participate in the discussion and advocate for
your patch.  Sometimes your patch may get lost in the shuffle.  It's
appropriate to send a reminder email to p5p if no action has been taken
in a month.  Please remember that the Perl 5 developers are all
volunteers, and be polite.</p>
<p>Changes are always applied directly to the main development branch,
called "blead".  Some patches may be backported to a maintenance
branch.  If you think your patch is appropriate for the maintenance
branch (see <a href="perlpolicy.html#MAINTENANCE-BRANCHES">MAINTENANCE BRANCHES in perlpolicy</a>), please explain why
when you submit it.</p>
<a name="Getting-your-patch-accepted"></a><h2>Getting your patch accepted</h2>
<p>If you are submitting a code patch there are several things that you
can do to help the Perl 5 Porters accept your patch.</p>
<a name="Patch-style"></a><h3>Patch style</h3>
<p>If you used git to check out the Perl source, then using <code class="inline"><span class="w">git</span>
format-patch</code>
 will produce a patch in a style suitable for Perl.  The
<code class="inline"><a class="l_k" href="functions/format.html">format-patch</a></code> command produces one patch file for each commit you
made.  If you prefer to send a single patch for all commits, you can
use <code class="inline"><span class="w">git</span> <span class="w">diff</span></code>
.</p>
<pre class="verbatim"><ol><li>  <span class="i">% git</span> <span class="w">checkout</span> <span class="w">blead</span></li><li>  % <span class="w">git</span> <span class="w">pull</span></li><li>  % <span class="w">git</span> <span class="w">diff</span> <span class="w">blead</span> <a class="l_k" href="functions/my.html">my</a>-<span class="w">branch</span>-<span class="w">name</span></li></ol></pre><p>This produces a patch based on the difference between blead and your
current branch.  It's important to make sure that blead is up to date
before producing the diff, that's why we call <code class="inline"><span class="w">git</span> <span class="w">pull</span></code>
 first.</p>
<p>We strongly recommend that you use git if possible.  It will make your
life easier, and ours as well.</p>
<p>However, if you're not using git, you can still produce a suitable
patch.  You'll need a pristine copy of the Perl source to diff against.
The porters prefer unified diffs.  Using GNU <code class="inline"><span class="w">diff</span></code>
, you can produce a
diff like this:</p>
<pre class="verbatim"><ol><li>  <span class="i">% diff</span> -<span class="w">Npurd</span> <span class="w">perl</span>.<span class="w">pristine</span> <span class="w">perl</span>.<span class="w">mine</span></li></ol></pre><p>Make sure that you <code class="inline"><span class="w">make</span> <span class="w">realclean</span></code>
 in your copy of Perl to remove any
build artifacts, or you may get a confusing result.</p>
<a name="Commit-message"></a><h3>Commit message</h3>
<p>As you craft each patch you intend to submit to the Perl core, it's
important to write a good commit message.  This is especially important
if your submission will consist of a series of commits.</p>
<p>The first line of the commit message should be a short description
without a period.  It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.</p>
<p>A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
only display the first line (cut off at 50 characters) when presenting
commit summaries.</p>
<p>The commit message should include a description of the problem that the
patch corrects or new functionality that the patch adds.</p>
<p>As a general rule of thumb, your commit message should help a
programmer who knows the Perl core quickly understand what you were
trying to do, how you were trying to do it, and why the change matters
to Perl.</p>
<ul>
<li><a name="*-Why"></a><b>Why</b>
<p>Your commit message should describe why the change you are making is
important.  When someone looks at your change in six months or six
years, your intent should be clear.</p>
<p>If you're deprecating a feature with the intent of later simplifying
another bit of code, say so.  If you're fixing a performance problem or
adding a new feature to support some other bit of the core, mention
that.</p>
</li>
<li><a name="*-What"></a><b>What</b>
<p>Your commit message should describe what part of the Perl core you're
changing and what you expect your patch to do.</p>
</li>
<li><a name="*-How"></a><b>How</b>
<p>While it's not necessary for documentation changes, new tests or
trivial patches, it's often worth explaining how your change works.
Even if it's clear to you today, it may not be clear to a porter next
month or next year.</p>
</li>
</ul>
<p>A commit message isn't intended to take the place of comments in your
code.  Commit messages should describe the change you made, while code
comments should describe the current state of the code.</p>
<p>If you've just implemented a new feature, complete with doc, tests and
well-commented code, a brief commit message will often suffice.  If,
however, you've just changed a single character deep in the parser or
lexer, you might need to write a small novel to ensure that future
readers understand what you did and why you did it.</p>
<a name="Comments%2c-Comments%2c-Comments"></a><h3>Comments, Comments, Comments</h3>
<p>Be sure to adequately comment your code.  While commenting every line
is unnecessary, anything that takes advantage of side effects of
operators, that creates changes that will be felt outside of the
function being patched, or that others may find confusing should be
documented.  If you are going to err, it is better to err on the side
of adding too many comments than too few.</p>
<p>The best comments explain <i>why</i> the code does what it does, not <i>what
it does</i>.</p>
<a name="Style"></a><h3>Style</h3>
<p>In general, please follow the particular style of the code you are
patching.</p>
<p>In particular, follow these general guidelines for patching Perl
sources:</p>
<ul>
<li>
<p>4-wide indents for code, 2-wide indents for nested CPP <code class="inline"><span class="c">#define</span></code>
s,
with 8-wide tabstops.</p>
</li>
<li>
<p>Use spaces for indentation, not tab characters.</p>
<p>The codebase is a mixture of tabs and spaces for indentation, and we
are moving to spaces only.  Converting lines you're patching from 8-wide
tabs to spaces will help this migration.</p>
</li>
<li>
<p>Try hard not to exceed 79-columns</p>
</li>
<li>
<p>ANSI C prototypes</p>
</li>
<li>
<p>Uncuddled elses and "K&amp;R" style for indenting control constructs</p>
</li>
<li>
<p>No C++ style (//) comments</p>
</li>
<li>
<p>Mark places that need to be revisited with XXX (and revisit often!)</p>
</li>
<li>
<p>Opening brace lines up with "if" when conditional spans multiple lines;
should be at end-of-line otherwise</p>
</li>
<li>
<p>In function definitions, name starts in column 0 (return value-type is on
previous line)</p>
</li>
<li>
<p>Single space after keywords that are followed by parens, no space
between function name and following paren</p>
</li>
<li>
<p>Avoid assignments in conditionals, but if they're unavoidable, use
extra paren, e.g. "if (a &amp;&amp; (b = c)) ..."</p>
</li>
<li>
<p>"return foo;" rather than "return(foo);"</p>
</li>
<li>
<p>"if (!foo) ..." rather than "if (foo == FALSE) ..." etc.</p>
</li>
<li>
<p>Do not declare variables using "register".  It may be counterproductive
with modern compilers, and is deprecated in C++, under which the Perl
source is regularly compiled.</p>
</li>
<li>
<p>In-line functions that are in headers that are accessible to XS code
need to be able to compile without warnings with commonly used extra
compilation flags, such as gcc's <code class="inline">-<span class="w">Wswitch</span>-<span class="w">default</span></code>
 which warns
whenever a switch statement does not have a "default" case.  The use of
these extra flags is to catch potential problems in legal C code, and
is often used by Perl aggregators, such as Linux distributors.</p>
</li>
</ul>
<a name="Test-suite"></a><h3>Test suite</h3>
<p>If your patch changes code (rather than just changing documentation),
you should also include one or more test cases which illustrate the bug
you're fixing or validate the new functionality you're adding.  In
general, you should update an existing test file rather than create a
new one.</p>
<p>Your test suite additions should generally follow these guidelines
(courtesy of Gurusamy Sarathy &lt;gsar@activestate.com&gt;):</p>
<ul>
<li>
<p>Know what you're testing.  Read the docs, and the source.</p>
</li>
<li>
<p>Tend to fail, not succeed.</p>
</li>
<li>
<p>Interpret results strictly.</p>
</li>
<li>
<p>Use unrelated features (this will flush out bizarre interactions).</p>
</li>
<li>
<p>Use non-standard idioms (otherwise you are not testing TIMTOWTDI).</p>
</li>
<li>
<p>Avoid using hardcoded test numbers whenever possible (the EXPECTED/GOT
found in t/op/tie.t is much more maintainable, and gives better failure
reports).</p>
</li>
<li>
<p>Give meaningful error messages when a test fails.</p>
</li>
<li>
<p>Avoid using qx// and system() unless you are testing for them.  If you
do use them, make sure that you cover _all_ perl platforms.</p>
</li>
<li>
<p>Unlink any temporary files you create.</p>
</li>
<li>
<p>Promote unforeseen warnings to errors with $SIG{__WARN__}.</p>
</li>
<li>
<p>Be sure to use the libraries and modules shipped with the version being
tested, not those that were already installed.</p>
</li>
<li>
<p>Add comments to the code explaining what you are testing for.</p>
</li>
<li>
<p>Make updating the '1..42' string unnecessary.  Or make sure that you
update it.</p>
</li>
<li>
<p>Test _all_ behaviors of a given operator, library, or function.</p>
<p>Test all optional arguments.</p>
<p>Test return values in various contexts (boolean, scalar, list, lvalue).</p>
<p>Use both global and lexical variables.</p>
<p>Don't forget the exceptional, pathological cases.</p>
</li>
</ul>
<a name="Patching-a-core-module"></a><h2>Patching a core module</h2>
<p>This works just like patching anything else, with one extra
consideration.</p>
<p>Modules in the <i>cpan/</i> directory of the source tree are maintained
outside of the Perl core.  When the author updates the module, the
updates are simply copied into the core.  See that module's
documentation or its listing on <a href="http://search.cpan.org/">http://search.cpan.org/</a> for more
information on reporting bugs and submitting patches.</p>
<p>In most cases, patches to modules in <i>cpan/</i> should be sent upstream
and should not be applied to the Perl core individually.  If a patch to
a file in <i>cpan/</i> absolutely cannot wait for the fix to be made
upstream, released to CPAN and copied to blead, you must add (or
update) a <code class="inline"><span class="w">CUSTOMIZED</span></code>
 entry in the <i>"Porting/Maintainers.pl"</i> file
to flag that a local modification has been made.  See
<i>"Porting/Maintainers.pl"</i> for more details.</p>
<p>In contrast, modules in the <i>dist/</i> directory are maintained in the
core.</p>
<a name="Updating-perldelta"></a><h2>Updating perldelta</h2>
<p>For changes significant enough to warrant a <i>pod/perldelta.pod</i> entry,
the porters will greatly appreciate it if you submit a delta entry
along with your actual change.  Significant changes include, but are
not limited to:</p>
<ul>
<li>
<p>Adding, deprecating, or removing core features</p>
</li>
<li>
<p>Adding, deprecating, removing, or upgrading core or dual-life modules</p>
</li>
<li>
<p>Adding new core tests</p>
</li>
<li>
<p>Fixing security issues and user-visible bugs in the core</p>
</li>
<li>
<p>Changes that might break existing code, either on the perl or C level</p>
</li>
<li>
<p>Significant performance improvements</p>
</li>
<li>
<p>Adding, removing, or significantly changing documentation in the
<i>pod/</i> directory</p>
</li>
<li>
<p>Important platform-specific changes</p>
</li>
</ul>
<p>Please make sure you add the perldelta entry to the right section
within <i>pod/perldelta.pod</i>.  More information on how to write good
perldelta entries is available in the <code class="inline"><span class="w">Style</span></code>
 section of
<i>Porting/how_to_write_a_perldelta.pod</i>.</p>
<a name="What-makes-for-a-good-patch%3f"></a><h2>What makes for a good patch?</h2>
<p>New features and extensions to the language can be contentious.  There
is no specific set of criteria which determine what features get added,
but here are some questions to consider when developing a patch:</p>
<a name="Does-the-concept-match-the-general-goals-of-Perl%3f"></a><h3>Does the concept match the general goals of Perl?</h3>
<p>Our goals include, but are not limited to:</p>
<dl>
<dt>1.</dt><dd>
<p>Keep it fast, simple, and useful.</p>
</dd>
<dt>2.</dt><dd>
<p>Keep features/concepts as orthogonal as possible.</p>
</dd>
<dt>3.</dt><dd>
<p>No arbitrary limits (platforms, data sizes, cultures).</p>
</dd>
<dt>4.</dt><dd>
<p>Keep it open and exciting to use/patch/advocate Perl everywhere.</p>
</dd>
<dt>5.</dt><dd>
<p>Either assimilate new technologies, or build bridges to them.</p>
</dd>
</dl>
<a name="Where-is-the-implementation%3f"></a><h3>Where is the implementation?</h3>
<p>All the talk in the world is useless without an implementation.  In
almost every case, the person or people who argue for a new feature
will be expected to be the ones who implement it.  Porters capable of
coding new features have their own agendas, and are not available to
implement your (possibly good) idea.</p>
<a name="Backwards-compatibility"></a><h3>Backwards compatibility</h3>
<p>It's a cardinal sin to break existing Perl programs.  New warnings can
be contentious--some say that a program that emits warnings is not
broken, while others say it is.  Adding keywords has the potential to
break programs, changing the meaning of existing token sequences or
functions might break programs.</p>
<p>The Perl 5 core includes mechanisms to help porters make backwards
incompatible changes more compatible such as the <a href="feature.html">feature</a> and
<a href="deprecate.html">deprecate</a> modules.  Please use them when appropriate.</p>
<a name="Could-it-be-a-module-instead%3f"></a><h3>Could it be a module instead?</h3>
<p>Perl 5 has extension mechanisms, modules and XS, specifically to avoid
the need to keep changing the Perl interpreter.  You can write modules
that export functions, you can give those functions prototypes so they
can be called like built-in functions, you can even write XS code to
mess with the runtime data structures of the Perl interpreter if you
want to implement really complicated things.</p>
<p>Whenever possible, new features should be prototyped in a CPAN module
before they will be considered for the core.</p>
<a name="Is-the-feature-generic-enough%3f"></a><h3>Is the feature generic enough?</h3>
<p>Is this something that only the submitter wants added to the language,
or is it broadly useful?  Sometimes, instead of adding a feature with a
tight focus, the porters might decide to wait until someone implements
the more generalized feature.</p>
<a name="Does-it-potentially-introduce-new-bugs%3f"></a><h3>Does it potentially introduce new bugs?</h3>
<p>Radical rewrites of large chunks of the Perl interpreter have the
potential to introduce new bugs.</p>
<a name="How-big-is-it%3f"></a><h3>How big is it?</h3>
<p>The smaller and more localized the change, the better.  Similarly, a
series of small patches is greatly preferred over a single large patch.</p>
<a name="Does-it-preclude-other-desirable-features%3f"></a><h3>Does it preclude other desirable features?</h3>
<p>A patch is likely to be rejected if it closes off future avenues of
development.  For instance, a patch that placed a true and final
interpretation on prototypes is likely to be rejected because there are
still options for the future of prototypes that haven't been addressed.</p>
<a name="Is-the-implementation-robust%3f"></a><h3>Is the implementation robust?</h3>
<p>Good patches (tight code, complete, correct) stand more chance of going
in.  Sloppy or incorrect patches might be placed on the back burner
until the pumpking has time to fix, or might be discarded altogether
without further notice.</p>
<a name="Is-the-implementation-generic-enough-to-be-portable%3f"></a><h3>Is the implementation generic enough to be portable?</h3>
<p>The worst patches make use of system-specific features.  It's highly
unlikely that non-portable additions to the Perl language will be
accepted.</p>
<a name="Is-the-implementation-tested%3f"></a><h3>Is the implementation tested?</h3>
<p>Patches which change behaviour (fixing bugs or introducing new
features) must include regression tests to verify that everything works
as expected.</p>
<p>Without tests provided by the original author, how can anyone else
changing perl in the future be sure that they haven't unwittingly
broken the behaviour the patch implements? And without tests, how can
the patch's author be confident that his/her hard work put into the
patch won't be accidentally thrown away by someone in the future?</p>
<a name="Is-there-enough-documentation%3f"></a><h3>Is there enough documentation?</h3>
<p>Patches without documentation are probably ill-thought out or
incomplete.  No features can be added or changed without documentation,
so submitting a patch for the appropriate pod docs as well as the
source code is important.</p>
<a name="Is-there-another-way-to-do-it%3f"></a><h3>Is there another way to do it?</h3>
<p>Larry said "Although the Perl Slogan is <i>There's More Than One Way to
Do It</i>, I hesitate to make 10 ways to do something".  This is a tricky
heuristic to navigate, though--one man's essential addition is another
man's pointless cruft.</p>
<a name="Does-it-create-too-much-work%3f"></a><h3>Does it create too much work?</h3>
<p>Work for the pumpking, work for Perl programmers, work for module
authors, ... Perl is supposed to be easy.</p>
<a name="Patches-speak-louder-than-words"></a><h3>Patches speak louder than words</h3>
<p>Working code is always preferred to pie-in-the-sky ideas.  A patch to
add a feature stands a much higher chance of making it to the language
than does a random feature request, no matter how fervently argued the
request might be.  This ties into "Will it be useful?", as the fact
that someone took the time to make the patch demonstrates a strong
desire for the feature.</p>
<a name="TESTING"></a><h1>TESTING</h1>
<p>The core uses the same testing style as the rest of Perl, a simple
"ok/not ok" run through Test::Harness, but there are a few special
considerations.</p>
<p>There are three ways to write a test in the core: <a href="Test/More.html">Test::More</a>,
<i>t/test.pl</i> and ad hoc <code class="inline"><a class="l_k" href="functions/print.html">print</a> <span class="i">$test</span> ? <span class="q">&quot;ok 42\n&quot;</span> <span class="co">:</span> <span class="q">&quot;not ok 42\n&quot;</span></code>
.
The decision of which to use depends on what part of the test suite
you're working on.  This is a measure to prevent a high-level failure
(such as Config.pm breaking) from causing basic functionality tests to
fail.</p>
<p>The <i>t/test.pl</i> library provides some of the features of
<a href="Test/More.html">Test::More</a>, but avoids loading most modules and uses as few core
features as possible.</p>
<p>If you write your own test, use the <a href="http://search.cpan.org/perldoc/http:#%2ftestanything.org">Test Anything Protocol</a>.</p>
<ul>
<li><a name="*-_t%2fbase_%2c-_t%2fcomp_-and-_t%2fopbasic_"></a><b><i>t/base</i>, <i>t/comp</i> and <i>t/opbasic</i></b>
<p>Since we don't know if <code class="inline"><a class="l_k" href="functions/require.html">require</a></code> works, or even subroutines, use ad hoc
tests for these three.  Step carefully to avoid using the feature being
tested.  Tests in <i>t/opbasic</i>, for instance, have been placed there
rather than in <i>t/op</i> because they test functionality which
<i>t/test.pl</i> presumes has already been demonstrated to work.</p>
</li>
<li><a name="*-_t%2fcmd_%2c-_t%2frun_%2c-_t%2fio_-and-_t%2fop_"></a><b><i>t/cmd</i>, <i>t/run</i>, <i>t/io</i> and <i>t/op</i></b>
<p>Now that basic require() and subroutines are tested, you can use the
<i>t/test.pl</i> library.</p>
<p>You can also use certain libraries like Config conditionally, but be
sure to skip the test gracefully if it's not there.</p>
</li>
<li><a name="*-Everything-else"></a><b>Everything else</b>
<p>Now that the core of Perl is tested, <a href="Test/More.html">Test::More</a> can and should be
used.  You can also use the full suite of core modules in the tests.</p>
</li>
</ul>
<p>When you say "make test", Perl uses the <i>t/TEST</i> program to run the
test suite (except under Win32 where it uses <i>t/harness</i> instead).
All tests are run from the <i>t/</i> directory, <b>not</b> the directory which
contains the test.  This causes some problems with the tests in
<i>lib/</i>, so here's some opportunity for some patching.</p>
<p>You must be triply conscious of cross-platform concerns.  This usually
boils down to using <a href="File/Spec.html">File::Spec</a>, avoiding things like <code class="inline"><a class="l_k" href="functions/fork.html">fork()</a></code>
and <code class="inline"><a class="l_k" href="functions/system.html">system()</a></code> unless absolutely necessary, and not assuming that a
given character has a particular ordinal value (code point) or that its
UTF-8 representation is composed of particular bytes.</p>
<p>There are several functions available to specify characters and code
points portably in tests.  The always-preloaded functions
<code class="inline"><span class="i">utf8::unicode_to_native</span><span class="s">(</span><span class="s">)</span></code>
 and its inverse
<code class="inline"><span class="i">utf8::native_to_unicode</span><span class="s">(</span><span class="s">)</span></code>
 take code points and translate
appropriately.  The file <i>t/charset_tools.pl</i> has several functions
that can be useful.  It has versions of the previous two functions
that take strings as inputs -- not single numeric code points:
<code class="inline"><span class="i">uni_to_native</span><span class="s">(</span><span class="s">)</span></code>
 and <code class="inline"><span class="i">native_to_uni</span><span class="s">(</span><span class="s">)</span></code>
.  If you must look at the
individual bytes comprising a UTF-8 encoded string,
<code class="inline"><span class="i">byte_utf8a_to_utf8n</span><span class="s">(</span><span class="s">)</span></code>
 takes as input a string of those bytes encoded
for an ASCII platform, and returns the equivalent string in the native
platform.  For example, <code class="inline"><span class="i">byte_utf8a_to_utf8n</span><span class="s">(</span><span class="q">&quot;\xC2\xA0&quot;</span><span class="s">)</span></code>
 returns the
byte sequence on the current platform that form the UTF-8 for <code class="inline"><span class="w">U</span>+<span class="n">00</span><span class="w">A0</span></code>
,
since <code class="inline"><span class="q">&quot;\xC2\xA0&quot;</span></code>
 are the UTF-8 bytes on an ASCII platform for that
code point.  This function returns <code class="inline"><span class="q">&quot;\xC2\xA0&quot;</span></code>
 on an ASCII platform, and
<code class="inline"><span class="q">&quot;\x80\x41&quot;</span></code>
 on an EBCDIC 1047 one.</p>
<p>But easiest is, if the character is specifiable as a literal, like
<code class="inline"><span class="q">&quot;A&quot;</span></code>
 or <code class="inline"><span class="q">&quot;%&quot;</span></code>
, to use that; if not so specificable, you can use use
<code class="inline">\<span class="w">N</span><span class="s">{</span><span class="s">}</span></code>
 , if the side effects aren't troublesome.  Simply specify all
your characters in hex, using <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="w">ZZ</span><span class="s">}</span></code>
 instead of <code class="inline">\<span class="w">xZZ</span></code>
.  <code class="inline">\<span class="w">N</span><span class="s">{</span><span class="s">}</span></code>

is the Unicode name, and so it
always gives you the Unicode character.  <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">41</span><span class="s">}</span></code>
 is the character
whose Unicode code point is <code class="inline"><span class="n">0x41</span></code>
, hence is <code class="inline"><span class="q">&#39;A&#39;</span></code>
 on all platforms.
The side effects are:</p>
<ul>
<li>
<p>These select Unicode rules.  That means that in double-quotish strings,
the string is always converted to UTF-8 to force a Unicode
interpretation (you can <code class="inline"><span class="i">utf8::downgrade</span><span class="s">(</span><span class="s">)</span></code>
 afterwards to convert back
to non-UTF8, if possible).  In regular expression patterns, the
conversion isn't done, but if the character set modifier would
otherwise be <code class="inline">/d</code>, it is changed to <code class="inline"><span class="q">/u</span></code>
.</p>
</li>
<li>
<p>If you use the form <code class="inline">\N{<i>character name</i>}</code>, the <a href="charnames.html">charnames</a> module
gets automatically loaded.  This may not be suitable for the test level
you are doing.</p>
</li>
</ul>
<p>If you are testing locales (see <a href="perllocale.html">perllocale</a>), there are helper
functions in <i>t/loc_tools.pl</i> to enable you to see what locales there
are on the current platform.</p>
<a name="Special-make-test-targets"></a><h2>Special <code class="inline"><span class="w">make</span> <span class="w">test</span></code>
 targets</h2>
<p>There are various special make targets that can be used to test Perl
slightly differently than the standard "test" target.  Not all them are
expected to give a 100% success rate.  Many of them have several
aliases, and many of them are not available on certain operating
systems.</p>
<ul>
<li><a name="*-test_porting"></a><b>test_porting</b>
<p>This runs some basic sanity tests on the source tree and helps catch
basic errors before you submit a patch.</p>
</li>
<li><a name="*-minitest"></a><b>minitest</b>
<p>Run <i>miniperl</i> on <i>t/base</i>, <i>t/comp</i>, <i>t/cmd</i>, <i>t/run</i>, <i>t/io</i>,
<i>t/op</i>, <i>t/uni</i> and <i>t/mro</i> tests.</p>
</li>
<li><a name="*-test.valgrind-check.valgrind"></a><b>test.valgrind check.valgrind</b>
<p>(Only in Linux) Run all the tests using the memory leak + naughty
memory access tool "valgrind".  The log files will be named
<i>testname.valgrind</i>.</p>
</li>
<li><a name="*-test_harness"></a><b>test_harness</b>
<p>Run the test suite with the <i>t/harness</i> controlling program, instead
of <i>t/TEST</i>.  <i>t/harness</i> is more sophisticated, and uses the
<a href="Test/Harness.html">Test::Harness</a> module, thus using this test target supposes that perl
mostly works.  The main advantage for our purposes is that it prints a
detailed summary of failed tests at the end.  Also, unlike <i>t/TEST</i>,
it doesn't redirect stderr to stdout.</p>
<p>Note that under Win32 <i>t/harness</i> is always used instead of <i>t/TEST</i>,
so there is no special "test_harness" target.</p>
<p>Under Win32's "test" target you may use the TEST_SWITCHES and
TEST_FILES environment variables to control the behaviour of
<i>t/harness</i>.  This means you can say</p>
<pre class="verbatim"><ol><li>    nmake test TEST_FILES="op/*.t"</li><li>    nmake test TEST_SWITCHES="-torture" TEST_FILES="op/*.t"</li></ol></pre></li>
<li><a name="*-test-notty-test_notty"></a><b>test-notty test_notty</b>
<p>Sets PERL_SKIP_TTY_TEST to true before running normal test.</p>
</li>
</ul>
<a name="Parallel-tests"></a><h2>Parallel tests</h2>
<p>The core distribution can now run its regression tests in parallel on
Unix-like platforms.  Instead of running <code class="inline"><span class="w">make</span> <span class="w">test</span></code>
, set <code class="inline"><span class="w">TEST_JOBS</span></code>

in your environment to the number of tests to run in parallel, and run
<code class="inline"><span class="w">make</span> <span class="w">test_harness</span></code>
.  On a Bourne-like shell, this can be done as</p>
<pre class="verbatim"><ol><li>    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel</li></ol></pre><p>An environment variable is used, rather than parallel make itself,
because <a href="TAP/Harness.html">TAP::Harness</a> needs to be able to schedule individual
non-conflicting test scripts itself, and there is no standard interface
to <code class="inline"><span class="w">make</span></code>
 utilities to interact with their job schedulers.</p>
<p>Note that currently some test scripts may fail when run in parallel
(most notably <i>dist/IO/t/io_dir.t</i>).  If necessary, run just the
failing scripts again sequentially and see if the failures go away.</p>
<a name="Running-tests-by-hand"></a><h2>Running tests by hand</h2>
<p>You can run part of the test suite by hand by using one of the
following commands from the <i>t/</i> directory:</p>
<pre class="verbatim"><ol><li>    ./perl -I../lib TEST list-of-.t-files</li></ol></pre><p>or</p>
<pre class="verbatim"><ol><li>    ./perl -I../lib harness list-of-.t-files</li></ol></pre><p>(If you don't specify test scripts, the whole test suite will be run.)</p>
<a name="Using-_t%2fharness_-for-testing"></a><h2>Using <i>t/harness</i> for testing</h2>
<p>If you use <code class="inline"><span class="w">harness</span></code>
 for testing, you have several command line
options available to you.  The arguments are as follows, and are in the
order that they must appear if used together.</p>
<pre class="verbatim"><ol><li>    <span class="w">harness</span> -<span class="w">v</span> -<span class="w">torture</span> -<span class="w">re</span>=<span class="w">pattern</span> <span class="w">LIST</span> <span class="w">OF</span> <span class="w">FILES</span> <span class="w">TO</span> <span class="w">TEST</span></li><li>    <span class="w">harness</span> -<span class="w">v</span> -<span class="w">torture</span> -<span class="w">re</span> <span class="w">LIST</span> <span class="w">OF</span> <span class="w">PATTERNS</span> <span class="w">TO</span> <span class="w">MATCH</span></li></ol></pre><p>If <code class="inline"><span class="w">LIST</span> <span class="w">OF</span> <span class="w">FILES</span> <span class="w">TO</span> <span class="w">TEST</span></code>
 is omitted, the file list is obtained from
the manifest.  The file list may include shell wildcards which will be
expanded out.</p>
<ul>
<li><a name="*--v"></a><b>-v</b>
<p>Run the tests under verbose mode so you can see what tests were run,
and debug output.</p>
</li>
<li><a name="*--torture"></a><b>-torture</b>
<p>Run the torture tests as well as the normal set.</p>
</li>
<li><a name="*--re%3dPATTERN"></a><b>-re=PATTERN</b>
<p>Filter the file list so that all the test files run match PATTERN.
Note that this form is distinct from the <b>-re LIST OF PATTERNS</b> form
below in that it allows the file list to be provided as well.</p>
</li>
<li><a name="*--re-LIST-OF-PATTERNS"></a><b>-re LIST OF PATTERNS</b>
<p>Filter the file list so that all the test files run match
/(LIST|OF|PATTERNS)/.  Note that with this form the patterns are joined
by '|' and you cannot supply a list of files, instead the test files
are obtained from the MANIFEST.</p>
</li>
</ul>
<p>You can run an individual test by a command similar to</p>
<pre class="verbatim"><ol><li>    .<span class="q">/perl -I../</span><span class="w">lib</span> <span class="w">path</span>/<span class="w">to</span>/<span class="w">foo</span>.<span class="w">t</span></li></ol></pre><p>except that the harnesses set up some environment variables that may
affect the execution of the test:</p>
<ul>
<li><a name="*-PERL_CORE%3d1"></a><b>PERL_CORE=1</b>
<p>indicates that we're running this test as part of the perl core test
suite.  This is useful for modules that have a dual life on CPAN.</p>
</li>
<li><a name="*-PERL_DESTRUCT_LEVEL%3d2"></a><b>PERL_DESTRUCT_LEVEL=2</b>
<p>is set to 2 if it isn't set already (see
<a href="perlhacktips.html#PERL_DESTRUCT_LEVEL">PERL_DESTRUCT_LEVEL in perlhacktips</a>).</p>
</li>
<li><a name="*-PERL"></a><b>PERL</b>
<p>(used only by <i>t/TEST</i>) if set, overrides the path to the perl
executable that should be used to run the tests (the default being
<i>./perl</i>).</p>
</li>
<li><a name="*-PERL_SKIP_TTY_TEST"></a><b>PERL_SKIP_TTY_TEST</b>
<p>if set, tells to skip the tests that need a terminal.  It's actually
set automatically by the Makefile, but can also be forced artificially
by running 'make test_notty'.</p>
</li>
</ul>
<a name="Other-environment-variables-that-may-influence-tests"></a><h3>Other environment variables that may influence tests</h3>
<ul>
<li><a name="*-PERL_TEST_Net_Ping"></a><b>PERL_TEST_Net_Ping</b>
<p>Setting this variable runs all the Net::Ping modules tests, otherwise
some tests that interact with the outside world are skipped.  See
<a href="perl58delta.html">perl58delta</a>.</p>
</li>
<li><a name="*-PERL_TEST_NOVREXX"></a><b>PERL_TEST_NOVREXX</b>
<p>Setting this variable skips the vrexx.t tests for OS2::REXX.</p>
</li>
<li><a name="*-PERL_TEST_NUMCONVERTS"></a><b>PERL_TEST_NUMCONVERTS</b>
<p>This sets a variable in op/numconvert.t.</p>
</li>
<li><a name="*-PERL_TEST_MEMORY"></a><b>PERL_TEST_MEMORY</b>
<p>Setting this variable includes the tests in <i>t/bigmem/</i>.  This should
be set to the number of gigabytes of memory available for testing, eg.
<code class="inline"><span class="w">PERL_TEST_MEMORY</span>=<span class="n">4</span></code>
 indicates that tests that require 4GiB of
available memory can be run safely.</p>
</li>
</ul>
<p>See also the documentation for the Test and Test::Harness modules, for
more environment variables that affect testing.</p>
<a name="Performance-testing"></a><h2>Performance testing</h2>
<p>The file <i>t/perf/benchmarks</i> contains snippets of perl code which are
intended to be benchmarked across a range of perls by the
<i>Porting/bench.pl</i> tool. If you fix or enhance a performance issue, you
may want to add a representative code sample to the file, then run
<i>bench.pl</i> against the previous and current perls to see what difference
it has made, and whether anything else has slowed down as a consequence.</p>
<p>The file <i>t/perf/opcount.t</i> is designed to test whether a particular
code snippet has been compiled into an optree containing specified
numbers of particular op types. This is good for testing whether
optimisations which alter ops, such as converting an <code class="inline"><span class="w">aelem</span></code>
 op into an
<code class="inline"><span class="w">aelemfast</span></code>
 op, are really doing that.</p>
<p>The files <i>t/perf/speed.t</i> and <i>t/re/speed.t</i> are designed to test
things that run thousands of times slower if a particular optimisation
is broken (for example, the utf8 length cache on long utf8 strings).
Add a test that will take a fraction of a second normally, and minutes
otherwise, causing the test file to time out on failure.</p>
<a name="MORE-READING-FOR-GUTS-HACKERS"></a><h1>MORE READING FOR GUTS HACKERS</h1>
<p>To hack on the Perl guts, you'll need to read the following things:</p>
<ul>
<li><a name="*-the-perlsource-manpage"></a><b><a href="perlsource.html">perlsource</a></b>
<p>An overview of the Perl source tree.  This will help you find the files
you're looking for.</p>
</li>
<li><a name="*-the-perlinterp-manpage"></a><b><a href="perlinterp.html">perlinterp</a></b>
<p>An overview of the Perl interpreter source code and some details on how
Perl does what it does.</p>
</li>
<li><a name="*-the-perlhacktut-manpage"></a><b><a href="perlhacktut.html">perlhacktut</a></b>
<p>This document walks through the creation of a small patch to Perl's C
code.  If you're just getting started with Perl core hacking, this will
help you understand how it works.</p>
</li>
<li><a name="*-the-perlhacktips-manpage"></a><b><a href="perlhacktips.html">perlhacktips</a></b>
<p>More details on hacking the Perl core.  This document focuses on lower
level details such as how to write tests, compilation issues,
portability, debugging, etc.</p>
<p>If you plan on doing serious C hacking, make sure to read this.</p>
</li>
<li><a name="*-the-perlguts-manpage"></a><b><a href="perlguts.html">perlguts</a></b>
<p>This is of paramount importance, since it's the documentation of what
goes where in the Perl source.  Read it over a couple of times and it
might start to make sense - don't worry if it doesn't yet, because the
best way to study it is to read it in conjunction with poking at Perl
source, and we'll do that later on.</p>
<p>Gisle Aas's "illustrated perlguts", also known as <i>illguts</i>, has very
helpful pictures:</p>
<p><a href="http://search.cpan.org/dist/illguts/">http://search.cpan.org/dist/illguts/</a></p>
</li>
<li><a name="*-the-perlxstut-manpage-and-the-perlxs-manpage"></a><b><a href="perlxstut.html">perlxstut</a> and <a href="perlxs.html">perlxs</a></b>
<p>A working knowledge of XSUB programming is incredibly useful for core
hacking; XSUBs use techniques drawn from the PP code, the portion of
the guts that actually executes a Perl program.  It's a lot gentler to
learn those techniques from simple examples and explanation than from
the core itself.</p>
</li>
<li><a name="*-the-perlapi-manpage"></a><b><a href="perlapi.html">perlapi</a></b>
<p>The documentation for the Perl API explains what some of the internal
functions do, as well as the many macros used in the source.</p>
</li>
<li><a name="*-_Porting%2fpumpkin.pod_"></a><b><i>Porting/pumpkin.pod</i></b>
<p>This is a collection of words of wisdom for a Perl porter; some of it
is only useful to the pumpkin holder, but most of it applies to anyone
wanting to go about Perl development.</p>
</li>
</ul>
<a name="CPAN-TESTERS-AND-PERL-SMOKERS"></a><h1>CPAN TESTERS AND PERL SMOKERS</h1>
<p>The CPAN testers ( <a href="http://testers.cpan.org/">http://testers.cpan.org/</a> ) are a group of volunteers
who test CPAN modules on a variety of platforms.</p>
<p>Perl Smokers ( <a href="http://www.nntp.perl.org/group/perl.daily-build/">http://www.nntp.perl.org/group/perl.daily-build/</a> and
<a href="http://www.nntp.perl.org/group/perl.daily-build.reports/">http://www.nntp.perl.org/group/perl.daily-build.reports/</a> )
automatically test Perl source releases on platforms with various
configurations.</p>
<p>Both efforts welcome volunteers.  In order to get involved in smoke
testing of the perl itself visit
<a href="http://search.cpan.org/dist/Test-Smoke/">http://search.cpan.org/dist/Test-Smoke/</a>.  In order to start smoke
testing CPAN modules visit
<a href="http://search.cpan.org/dist/CPANPLUS-YACSmoke/">http://search.cpan.org/dist/CPANPLUS-YACSmoke/</a> or
<a href="http://search.cpan.org/dist/minismokebox/">http://search.cpan.org/dist/minismokebox/</a> or
<a href="http://search.cpan.org/dist/CPAN-Reporter/">http://search.cpan.org/dist/CPAN-Reporter/</a>.</p>
<a name="WHAT-NEXT%3f"></a><h1>WHAT NEXT?</h1>
<p>If you've read all the documentation in the document and the ones
listed above, you're more than ready to hack on Perl.</p>
<p>Here's some more recommendations</p>
<ul>
<li>
<p>Subscribe to perl5-porters, follow the patches and try and understand
them; don't be afraid to ask if there's a portion you're not clear on -
who knows, you may unearth a bug in the patch...</p>
</li>
<li>
<p>Do read the README associated with your operating system, e.g.
README.aix on the IBM AIX OS.  Don't hesitate to supply patches to that
README if you find anything missing or changed over a new OS release.</p>
</li>
<li>
<p>Find an area of Perl that seems interesting to you, and see if you can
work out how it works.  Scan through the source, and step over it in
the debugger.  Play, poke, investigate, fiddle! You'll probably get to
understand not just your chosen area but a much wider range of
<i>perl</i>'s activity as well, and probably sooner than you'd think.</p>
</li>
</ul>
<a name="%22The-Road-goes-ever-on-and-on%2c-down-from-the-door-where-it-began.%22"></a><h2>"The Road goes ever on and on, down from the door where it began."</h2>
<p>If you can do these things, you've started on the long road to Perl
porting.  Thanks for wanting to help make Perl better - and happy
hacking!</p>
<a name="Metaphoric-Quotations"></a><h2>Metaphoric Quotations</h2>
<p>If you recognized the quote about the Road above, you're in luck.</p>
<p>Most software projects begin each file with a literal description of
each file's purpose.  Perl instead begins each with a literary allusion
to that file's purpose.</p>
<p>Like chapters in many books, all top-level Perl source files (along
with a few others here and there) begin with an epigrammatic
inscription that alludes, indirectly and metaphorically, to the
material you're about to read.</p>
<p>Quotations are taken from writings of J.R.R. Tolkien pertaining to his
Legendarium, almost always from <i>The Lord of the Rings</i>.  Chapters and
page numbers are given using the following editions:</p>
<ul>
<li>
<p><i>The Hobbit</i>, by J.R.R. Tolkien.  The hardcover, 70th-anniversary
edition of 2007 was used, published in the UK by Harper Collins
Publishers and in the US by the Houghton Mifflin Company.</p>
</li>
<li>
<p><i>The Lord of the Rings</i>, by J.R.R. Tolkien.  The hardcover,
50th-anniversary edition of 2004 was used, published in the UK by
Harper Collins Publishers and in the US by the Houghton Mifflin
Company.</p>
</li>
<li>
<p><i>The Lays of Beleriand</i>, by J.R.R. Tolkien and published posthumously
by his son and literary executor, C.J.R. Tolkien, being the 3rd of the
12 volumes in Christopher's mammoth <i>History of Middle Earth</i>.  Page
numbers derive from the hardcover edition, first published in 1983 by
George Allen &amp; Unwin; no page numbers changed for the special 3-volume
omnibus edition of 2002 or the various trade-paper editions, all again
now by Harper Collins or Houghton Mifflin.</p>
</li>
</ul>
<p>Other JRRT books fair game for quotes would thus include <i>The
Adventures of Tom Bombadil</i>, <i>The Silmarillion</i>, <i>Unfinished Tales</i>,
and <i>The Tale of the Children of Hurin</i>, all but the first
posthumously assembled by CJRT.  But <i>The Lord of the Rings</i> itself is
perfectly fine and probably best to quote from, provided you can find a
suitable quote there.</p>
<p>So if you were to supply a new, complete, top-level source file to add
to Perl, you should conform to this peculiar practice by yourself
selecting an appropriate quotation from Tolkien, retaining the original
spelling and punctuation and using the same format the rest of the
quotes are in.  Indirect and oblique is just fine; remember, it's a
metaphor, so being meta is, after all, what it's for.</p>
<a name="AUTHOR"></a><h1>AUTHOR</h1>
<p>This document was originally written by Nathan Torkington, and is
maintained by the perl5-porters mailing list.</p>




  <div id="page_index" class="hud_container">
    <div id="page_index_header" class="hud_header">
      <div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
      <div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
      <div id="page_index_topright" class="hud_topright"></div>
    </div>
    <div id="page_index_content" class="hud_content">
      <ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#SUPER-QUICK-PATCH-GUIDE">SUPER QUICK PATCH GUIDE</a><li><a href="#BUG-REPORTING">BUG REPORTING</a><li><a href="#PERL-5-PORTERS">PERL 5 PORTERS</a><ul><li><a href="#perl-changes-mailing-list">perl-changes mailing list</a><li><a href="#%23p5p-on-IRC">#p5p on IRC</a></ul><li><a href="#GETTING-THE-PERL-SOURCE">GETTING THE PERL SOURCE</a><ul><li><a href="#Read-access-via-Git">Read access via Git</a><li><a href="#Read-access-via-the-web">Read access via the web</a><li><a href="#Read-access-via-rsync">Read access via rsync</a><li><a href="#Write-access-via-git">Write access via git</a></ul><li><a href="#PATCHING-PERL">PATCHING PERL</a><ul><li><a href="#Submitting-patches">Submitting patches</a><li><a href="#Getting-your-patch-accepted">Getting your patch accepted</a><li><a href="#Patching-a-core-module">Patching a core module</a><li><a href="#Updating-perldelta">Updating perldelta</a><li><a href="#What-makes-for-a-good-patch%3f">What makes for a good patch?</a></ul><li><a href="#TESTING">TESTING</a><ul><li><a href="#Special-make-test-targets">Special make test targets</a><li><a href="#Parallel-tests">Parallel tests</a><li><a href="#Running-tests-by-hand">Running tests by hand</a><li><a href="#Using-_t%2fharness_-for-testing">Using _t/harness_ for testing</a><li><a href="#Performance-testing">Performance testing</a></ul><li><a href="#MORE-READING-FOR-GUTS-HACKERS">MORE READING FOR GUTS HACKERS</a><li><a href="#CPAN-TESTERS-AND-PERL-SMOKERS">CPAN TESTERS AND PERL SMOKERS</a><li><a href="#WHAT-NEXT%3f">WHAT NEXT?</a><ul><li><a href="#%22The-Road-goes-ever-on-and-on%2c-down-from-the-door-where-it-began.%22">"The Road goes ever on and on, down from the door where it began."</a><li><a href="#Metaphoric-Quotations">Metaphoric Quotations</a></ul><li><a href="#AUTHOR">AUTHOR</a></ul>
    </div>
    <div id="page_index_footer" class="hud_footer">
      <div id="page_index_bottomleft" class="hud_bottomleft"></div>
      <div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
      <div id="page_index_resize" class="hud_resize"></div>
    </div>
  </div>


	    &nbsp;
          </div>
          <div id="content_footer">
          </div>
        </div>
        <div class="clear"></div>
      </div>
      
    <div id="footer">
      <div id="footer_content">
        <div id="footer_strapline">
          perldoc.perl.org - Official documentation for the Perl programming language
        </div>
        <div id="footer_links">
          <div id="address">
            <p class="name">Contact details</p>
            <p class="address">
	      Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
	    </p>
            <p class="contact">
              Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
            </p>
          </div>
          <ul class="f1">
            <li>Manual
              <ul class="f2">
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">Changes</a>
              </ul>
            <li>Reference
              <ul class="f2">
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Variables</a>
              </ul>
            <li>Modules
              <ul class="f2">
                <li><a href="index-modules-A.html">Modules</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
              </ul>
            <li>Misc
              <ul class="f2">
                <li><a href="index-licence.html">License</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platforms</a>
              </ul>          </ul>
          <div class="clear"></div>
        </div>
      </div>
      <div id="footer_end">
      </div>
    </div>
      
    </div>
      <script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
      <script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
  perldoc.setPath(0);
  perldoc.pageName    = 'perlhack';
  perldoc.pageAddress = 'perlhack.html';
  perldoc.contentPage = 1;
  explorePerl.render();
  explorePerl.addEvents('explore_anchor');
</script>
    
  </body>
</html>