Install Perl 5.8.8
[msysgit.git] / mingw / html / pod / perltodo.html
blob52ee934696f116dd97cb78b561f639e9d2256c95
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>perltodo - Perl TO-DO List</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;perltodo - Perl TO-DO List</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#description">DESCRIPTION</a></li>
24 <li><a href="#the_roadmap_to_5_10">The roadmap to 5.10</a></li>
25 <ul>
27 <li><a href="#needed_for_a_5_9_4_release">Needed for a 5.9.4 release</a></li>
28 <li><a href="#needed_for_a_5_9_5_release">Needed for a 5.9.5 release</a></li>
29 <li><a href="#needed_for_a_5_9_6_release">Needed for a 5.9.6 release</a></li>
30 </ul>
32 <li><a href="#tasks_that_only_need_perl_knowledge">Tasks that only need Perl knowledge</a></li>
33 <ul>
35 <li><a href="#common_test_code_for_timed_bail_out">common test code for timed bail out</a></li>
36 <li><a href="#pod___html_conversion_in_the_core_still_sucks">POD -&gt; HTML conversion in the core still sucks</a></li>
37 <li><a href="#parallel_testing">Parallel testing</a></li>
38 <li><a href="#make_schwern_poorer">Make Schwern poorer</a></li>
39 <li><a href="#improve_the_coverage_of_the_core_tests">Improve the coverage of the core tests</a></li>
40 <li><a href="#test_b">test B</a></li>
41 <li><a href="#a_decent_benchmark">A decent benchmark</a></li>
42 <li><a href="#fix_tainting_bugs">fix tainting bugs</a></li>
43 <li><a href="#dual_life_everything">Dual life everything</a></li>
44 <li><a href="#improving_threads__shared">Improving <code>threads::shared</code></a></li>
45 <li><a href="#posix_memory_footprint">POSIX memory footprint</a></li>
46 </ul>
48 <li><a href="#tasks_that_need_a_little_sysadmintype_knowledge">Tasks that need a little sysadmin-type knowledge</a></li>
49 <ul>
51 <li><a href="#relocatable_perl">Relocatable perl</a></li>
52 <li><a href="#make_html_install_work">make HTML install work</a></li>
53 <li><a href="#compressed_man_pages">compressed man pages</a></li>
54 <li><a href="#add_a_code_coverage_target_to_the_makefile">Add a code coverage target to the Makefile</a></li>
55 <li><a href="#make_config_pm_cope_with_differences_between_build_and_installed_perl">Make Config.pm cope with differences between build and installed perl</a></li>
56 <li><a href="#make_parallel_builds_work">make parallel builds work</a></li>
57 <li><a href="#linker_specification_files">linker specification files</a></li>
58 </ul>
60 <li><a href="#tasks_that_need_a_little_c_knowledge">Tasks that need a little C knowledge</a></li>
61 <ul>
63 <li><a href="#make_it_clear_from_v_if_this_is_the_exact_official_release">Make it clear from -v if this is the exact official release</a></li>
64 <li><a href="#tidy_up_global_variables">Tidy up global variables</a></li>
65 <li><a href="#ordering_of_global_variables_">Ordering of ``global'' variables.</a></li>
66 <li><a href="#bincompat_functions">bincompat functions</a></li>
67 <li><a href="#am_i_hot_or_not">am I hot or not?</a></li>
68 <li><a href="#emulate_the_perthread_memory_pool_on_unix">emulate the per-thread memory pool on Unix</a></li>
69 <li><a href="#reduce_duplication_in_sv_setsv_flags">reduce duplication in sv_setsv_flags</a></li>
70 </ul>
72 <li><a href="#tasks_that_need_a_knowledge_of_xs">Tasks that need a knowledge of XS</a></li>
73 <ul>
75 <li><a href="#ipv6">IPv6</a></li>
76 <li><a href="#shrink_gvs__cvs">shrink <code>GV</code>s, <code>CV</code>s</a></li>
77 <li><a href="#merge_perl_sv_2_inpu_v">merge Perl_sv_2[inpu]v</a></li>
78 <li><a href="#utf8_caching_code">UTF8 caching code</a></li>
79 <li><a href="#implicit_latin_1____unicode_translation">Implicit Latin 1 =&gt; Unicode translation</a></li>
80 <li><a href="#autovivification">autovivification</a></li>
81 <li><a href="#unicode_in_filenames">Unicode in Filenames</a></li>
82 <li><a href="#unicode_in__env">Unicode in %ENV</a></li>
83 <li><a href="#use_less__memory_">use less 'memory'</a></li>
84 <li><a href="#reimplement__unique_in_a_way_that_is_actually_threadsafe">Re-implement <code>:unique</code> in a way that is actually thread-safe</a></li>
85 <li><a href="#make_tainting_consistent">Make tainting consistent</a></li>
86 <li><a href="#readpipe_list_"><code>readpipe(LIST)</code></a></li>
87 </ul>
89 <li><a href="#tasks_that_need_a_knowledge_of_the_interpreter">Tasks that need a knowledge of the interpreter</a></li>
90 <ul>
92 <li><a href="#lexical_pragmas">lexical pragmas</a></li>
93 <li><a href="#attach_detach_debugger_from_running_program">Attach/detach debugger from running program</a></li>
94 <li><a href="#constant_folding">Constant folding</a></li>
95 <li><a href="#lvalue_functions_for_lists">LVALUE functions for lists</a></li>
96 <li><a href="#lvalue_functions_in_the_debugger">LVALUE functions in the debugger</a></li>
97 <li><a href="#__prototype_character">_ prototype character</a></li>
98 <li><a href="#state_variables">state variables</a></li>
99 <li><a href="#_inc_source_filter_to_filter__simple">@INC source filter to Filter::Simple</a></li>
100 <li><a href="#regexp_optimiser_optional">regexp optimiser optional</a></li>
101 <li><a href="#unitcheck">UNITCHECK</a></li>
102 <li><a href="#optional_optimizer">optional optimizer</a></li>
103 <li><a href="#you_want__how__many">You WANT *how* many</a></li>
104 <li><a href="#lexical_aliases">lexical aliases</a></li>
105 <li><a href="#entersub_xs_vs_perl">entersub XS vs Perl</a></li>
106 <li><a href="#self_ties">Self ties</a></li>
107 <li><a href="#optimize_away___">Optimize away @_</a></li>
108 <li><a href="#what_hooks_would_assertions_need">What hooks would assertions need?</a></li>
109 </ul>
111 <li><a href="#big_projects">Big projects</a></li>
112 <ul>
114 <li><a href="#make_ithreads_more_robust">make ithreads more robust</a></li>
115 <li><a href="#icow">iCOW</a></li>
116 <li><a href="#________closures_in_regexps">(?{...}) closures in regexps</a></li>
117 <li><a href="#a_reentrant_regexp_engine">A re-entrant regexp engine</a></li>
118 </ul>
120 </ul>
121 <!-- INDEX END -->
123 <hr />
125 </p>
126 <h1><a name="name">NAME</a></h1>
127 <p>perltodo - Perl TO-DO List</p>
129 </p>
130 <hr />
131 <h1><a name="description">DESCRIPTION</a></h1>
132 <p>This is a list of wishes for Perl. The tasks we think are smaller or easier
133 are listed first. Anyone is welcome to work on any of these, but it's a good
134 idea to first contact <em><a href="mailto:perl5-porters@perl.org">perl5-porters@perl.org</a></em> to avoid duplication of
135 effort. By all means contact a pumpking privately first if you prefer.</p>
136 <p>Whilst patches to make the list shorter are most welcome, ideas to add to
137 the list are also encouraged. Check the perl5-porters archives for past
138 ideas, and any discussion about them. One set of archives may be found at:</p>
139 <pre>
140 <a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/">http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/</a></pre>
141 <p>What can we offer you in return? Fame, fortune, and everlasting glory? Maybe
142 not, but if your patch is incorporated, then we'll add your name to the
143 <em>AUTHORS</em> file, which ships in the official distribution. How many other
144 programming languages offer you 1 line of immortality?</p>
146 </p>
147 <hr />
148 <h1><a name="the_roadmap_to_5_10">The roadmap to 5.10</a></h1>
149 <p>The roadmap to 5.10 envisages feature based releases, as various items in this
150 TODO are completed.</p>
152 </p>
153 <h2><a name="needed_for_a_5_9_4_release">Needed for a 5.9.4 release</a></h2>
154 <ul>
155 <li>
156 <p>Review assertions. Review syntax to combine assertions. Assertions could take
157 advantage of the lexical pragmas work. <a href="#what_hooks_would_assertions_need">What hooks would assertions need?</a></p>
158 </li>
159 </ul>
161 </p>
162 <h2><a name="needed_for_a_5_9_5_release">Needed for a 5.9.5 release</a></h2>
163 <ul>
164 <li><strong><a name="item_implement_l_3c_2f__prototype_character_3e">Implement <a href="#__prototype_character">_ prototype character</a></a></strong>
166 <li><strong><a name="item_implement_l_3c_2fstate_variables_3e">Implement <a href="#state_variables">state variables</a></a></strong>
168 </ul>
170 </p>
171 <h2><a name="needed_for_a_5_9_6_release">Needed for a 5.9.6 release</a></h2>
172 <p>Stabilisation. If all goes well, this will be the equivalent of a 5.10-beta.</p>
174 </p>
175 <hr />
176 <h1><a name="tasks_that_only_need_perl_knowledge">Tasks that only need Perl knowledge</a></h1>
178 </p>
179 <h2><a name="common_test_code_for_timed_bail_out">common test code for timed bail out</a></h2>
180 <p>Write portable self destruct code for tests to stop them burning CPU in
181 infinite loops. This needs to avoid using alarm, as some of the tests are
182 testing alarm/sleep or timers.</p>
184 </p>
185 <h2><a name="pod___html_conversion_in_the_core_still_sucks">POD -&gt; HTML conversion in the core still sucks</a></h2>
186 <p>Which is crazy given just how simple POD purports to be, and how simple HTML
187 can be. It's not actually <em>as</em> simple as it sounds, particularly with the
188 flexibility POD allows for <code>=item</code>, but it would be good to improve the
189 visual appeal of the HTML generated, and to avoid it having any validation
190 errors. See also <a href="#make_html_install_work">make HTML install work</a>, as the layout of installation tree
191 is needed to improve the cross-linking.</p>
192 <p>The addition of <code>Pod::Simple</code> and its related modules may make this task
193 easier to complete.</p>
195 </p>
196 <h2><a name="parallel_testing">Parallel testing</a></h2>
197 <p>The core regression test suite is getting ever more comprehensive, which has
198 the side effect that it takes longer to run. This isn't so good. Investigate
199 whether it would be feasible to give the harness script the <strong>option</strong> of
200 running sets of tests in parallel. This would be useful for tests in
201 <em>t/op/*.t</em> and <em>t/uni/*.t</em> and maybe some sets of tests in <em>lib/</em>.</p>
202 <p>Questions to answer</p>
203 <ol>
204 <li>
205 <p>How does screen layout work when you're running more than one test?</p>
206 </li>
207 <li>
208 <p>How does the caller of test specify how many tests to run in parallel?</p>
209 </li>
210 <li>
211 <p>How do setup/teardown tests identify themselves?</p>
212 </li>
213 </ol>
214 <p>Pugs already does parallel testing - can their approach be re-used?</p>
216 </p>
217 <h2><a name="make_schwern_poorer">Make Schwern poorer</a></h2>
218 <p>We should have for everything. When all the core's modules are tested,
219 Schwern has promised to donate to $500 to TPF. We may need volunteers to
220 hold him upside down and shake vigorously in order to actually extract the
221 cash.</p>
222 <p>See <em>t/lib/1_compile.t</em> for the 3 remaining modules that need tests.</p>
224 </p>
225 <h2><a name="improve_the_coverage_of_the_core_tests">Improve the coverage of the core tests</a></h2>
226 <p>Use Devel::Cover to ascertain the core's test coverage, then add tests that
227 are currently missing.</p>
229 </p>
230 <h2><a name="test_b">test B</a></h2>
231 <p>A full test suite for the B module would be nice.</p>
233 </p>
234 <h2><a name="a_decent_benchmark">A decent benchmark</a></h2>
235 <p><code>perlbench</code> seems impervious to any recent changes made to the perl core. It
236 would be useful to have a reasonable general benchmarking suite that roughly
237 represented what current perl programs do, and measurably reported whether
238 tweaks to the core improve, degrade or don't really affect performance, to
239 guide people attempting to optimise the guts of perl. Gisle would welcome
240 new tests for perlbench.</p>
242 </p>
243 <h2><a name="fix_tainting_bugs">fix tainting bugs</a></h2>
244 <p>Fix the bugs revealed by running the test suite with the <code>-t</code> switch (via
245 <code>make test.taintwarn</code>).</p>
247 </p>
248 <h2><a name="dual_life_everything">Dual life everything</a></h2>
249 <p>As part of the ``dists'' plan, anything that doesn't belong in the smallest perl
250 distribution needs to be dual lifed. Anything else can be too. Figure out what
251 changes would be needed to package that module and its tests up for CPAN, and
252 do so. Test it with older perl releases, and fix the problems you find.</p>
254 </p>
255 <h2><a name="improving_threads__shared">Improving <code>threads::shared</code></a></h2>
256 <p>Investigate whether <code>threads::shared</code> could share aggregates properly with
257 only Perl level changes to shared.pm</p>
259 </p>
260 <h2><a name="posix_memory_footprint">POSIX memory footprint</a></h2>
261 <p>Ilya observed that use POSIX; eats memory like there's no tomorrow, and at
262 various times worked to cut it down. There is probably still fat to cut out -
263 for example POSIX passes Exporter some very memory hungry data structures.</p>
265 </p>
266 <hr />
267 <h1><a name="tasks_that_need_a_little_sysadmintype_knowledge">Tasks that need a little sysadmin-type knowledge</a></h1>
268 <p>Or if you prefer, tasks that you would learn from, and broaden your skills
269 base...</p>
271 </p>
272 <h2><a name="relocatable_perl">Relocatable perl</a></h2>
273 <p>The C level patches needed to create a relocatable perl binary are done, as
274 is the work on <em>Config.pm</em>. All that's left to do is the <code>Configure</code> tweaking
275 to let people specify how they want to do the install.</p>
277 </p>
278 <h2><a name="make_html_install_work">make HTML install work</a></h2>
279 <p>There is an <code>installhtml</code> target in the Makefile. It's marked as
280 ``experimental''. It would be good to get this tested, make it work reliably, and
281 remove the ``experimental'' tag. This would include</p>
282 <ol>
283 <li>
284 <p>Checking that cross linking between various parts of the documentation works.
285 In particular that links work between the modules (files with POD in <em>lib/</em>)
286 and the core documentation (files in <em>pod/</em>)</p>
287 </li>
288 <li>
289 <p>Work out how to split <code>perlfunc</code> into chunks, preferably one per function
290 group, preferably with general case code that could be used elsewhere.
291 Challenges here are correctly identifying the groups of functions that go
292 together, and making the right named external cross-links point to the right
293 page. Things to be aware of are <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item__2dx"><code>-X</code></a>, groups such as <code>getpwnam</code> to
294 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_endservent"><code>endservent</code></a>, two or more <code>=items</code> giving the different parameter lists, such
295 as</p>
296 <pre>
297 =item substr EXPR,OFFSET,LENGTH,REPLACEMENT
299 =item substr EXPR,OFFSET,LENGTH
301 =item substr EXPR,OFFSET</pre>
302 <p>and different parameter lists having different meanings. (eg <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_select"><code>select</code></a>)</p>
303 </li>
304 </ol>
306 </p>
307 <h2><a name="compressed_man_pages">compressed man pages</a></h2>
308 <p>Be able to install them. This would probably need a configure test to see how
309 the system does compressed man pages (same directory/different directory?
310 same filename/different filename), as well as tweaking the <em>installman</em> script
311 to compress as necessary.</p>
313 </p>
314 <h2><a name="add_a_code_coverage_target_to_the_makefile">Add a code coverage target to the Makefile</a></h2>
315 <p>Make it easy for anyone to run Devel::Cover on the core's tests. The steps
316 to do this manually are roughly</p>
317 <ul>
318 <li>
319 <p>do a normal <code>Configure</code>, but include Devel::Cover as a module to install
320 (see <em>INSTALL</em> for how to do this)</p>
321 </li>
322 <li>
323 <pre>
324 make perl</pre>
325 <li>
326 <pre>
327 cd t; HARNESS_PERL_SWITCHES=-MDevel::Cover ./perl -I../lib harness</pre>
328 <li>
329 <p>Process the resulting Devel::Cover database</p>
330 </li>
331 </ul>
332 <p>This just give you the coverage of the <em>.pm</em>s. To also get the C level
333 coverage you need to</p>
334 <ul>
335 <li>
336 <p>Additionally tell <code>Configure</code> to use the appropriate C compiler flags for
337 <code>gcov</code></p>
338 </li>
339 <li>
340 <pre>
341 make perl.gcov</pre>
342 <p>(instead of <code>make perl</code>)</p>
343 <li>
344 <p>After running the tests run <code>gcov</code> to generate all the <em>.gcov</em> files.
345 (Including down in the subdirectories of <em>ext/</em></p>
346 </li>
347 <li>
348 <p>(From the top level perl directory) run <code>gcov2perl</code> on all the <code>.gcov</code> files
349 to get their stats into the cover_db directory.</p>
350 </li>
351 <li>
352 <p>Then process the Devel::Cover database</p>
353 </li>
354 </ul>
355 <p>It would be good to add a single switch to <code>Configure</code> to specify that you
356 wanted to perform perl level coverage, and another to specify C level
357 coverage, and have <code>Configure</code> and the <em>Makefile</em> do all the right things
358 automatically.</p>
360 </p>
361 <h2><a name="make_config_pm_cope_with_differences_between_build_and_installed_perl">Make Config.pm cope with differences between build and installed perl</a></h2>
362 <p>Quite often vendors ship a perl binary compiled with their (pay-for)
363 compilers. People install a free compiler, such as gcc. To work out how to
364 build extensions, Perl interrogates <code>%Config</code>, so in this situation
365 <code>%Config</code> describes compilers that aren't there, and extension building
366 fails. This forces people into choosing between re-compiling perl themselves
367 using the compiler they have, or only using modules that the vendor ships.</p>
368 <p>It would be good to find a way teach <code>Config.pm</code> about the installation setup,
369 possibly involving probing at install time or later, so that the <code>%Config</code> in
370 a binary distribution better describes the installed machine, when the
371 installed machine differs from the build machine in some significant way.</p>
373 </p>
374 <h2><a name="make_parallel_builds_work">make parallel builds work</a></h2>
375 <p>Currently parallel builds (such as <code>make -j3</code>) don't work reliably. We believe
376 that this is due to incomplete dependency specification in the <em>Makefile</em>.
377 It would be good if someone were able to track down the causes of these
378 problems, so that parallel builds worked properly.</p>
380 </p>
381 <h2><a name="linker_specification_files">linker specification files</a></h2>
382 <p>Some platforms mandate that you provide a list of a shared library's external
383 symbols to the linker, so the core already has the infrastructure in place to
384 do this for generating shared perl libraries. My understanding is that the
385 GNU toolchain can accept an optional linker specification file, and restrict
386 visibility just to symbols declared in that file. It would be good to extend
387 <em>makedef.pl</em> to support this format, and to provide a means within
388 <code>Configure</code> to enable it. This would allow Unix users to test that the
389 export list is correct, and to build a perl that does not pollute the global
390 namespace with private symbols.</p>
392 </p>
393 <hr />
394 <h1><a name="tasks_that_need_a_little_c_knowledge">Tasks that need a little C knowledge</a></h1>
395 <p>These tasks would need a little C knowledge, but don't need any specific
396 background or experience with XS, or how the Perl interpreter works</p>
398 </p>
399 <h2><a name="make_it_clear_from_v_if_this_is_the_exact_official_release">Make it clear from -v if this is the exact official release</a></h2>
400 <p>Currently perl from <code>p4</code>/<code>rsync</code> ships with a <em>patchlevel.h</em> file that
401 usually defines one local patch, of the form ``MAINT12345'' or ``RC1''. The output
402 of perl -v doesn't report that a perl isn't an official release, and this
403 information can get lost in bugs reports. Because of this, the minor version
404 isn't bumped up until RC time, to minimise the possibility of versions of perl
405 escaping that believe themselves to be newer than they actually are.</p>
406 <p>It would be useful to find an elegant way to have the ``this is an interim
407 maintenance release'' or ``this is a release candidate'' in the terse -v output,
408 and have it so that it's easy for the pumpking to remove this just as the
409 release tarball is rolled up. This way the version pulled out of rsync would
410 always say ``I'm a development release'' and it would be safe to bump the
411 reported minor version as soon as a release ships, which would aid perl
412 developers.</p>
413 <p>This task is really about thinking of an elegant way to arrange the C source
414 such that it's trivial for the Pumpking to flag ``this is an official release''
415 when making a tarball, yet leave the default source saying ``I'm not the
416 official release''.</p>
418 </p>
419 <h2><a name="tidy_up_global_variables">Tidy up global variables</a></h2>
420 <p>There's a note in <em>intrpvar.h</em></p>
421 <pre>
422 /* These two variables are needed to preserve 5.8.x bincompat because
423 we can't change function prototypes of two exported functions.
424 Probably should be taken out of blead soon, and relevant prototypes
425 changed. */</pre>
426 <p>So doing this, and removing any of the unused variables still present would
427 be good.</p>
429 </p>
430 <h2><a name="ordering_of_global_variables_">Ordering of ``global'' variables.</a></h2>
431 <p><em>thrdvar.h</em> and <em>intrpvarh</em> define the ``global'' variables that need to be
432 per-thread under ithreads, where the variables are actually elements in a
433 structure. As C dictates, the variables must be laid out in order of
434 declaration. There is a comment
435 <code>/* Important ones in the first cache line (if alignment is done right) */</code>
436 which implies that at some point in the past the ordering was carefully chosen
437 (at least in part). However, it's clear that the ordering is less than perfect,
438 as currently there are things such as 7 <code>bool</code>s in a row, then something
439 typically requiring 4 byte alignment, and then an odd <code>bool</code> later on.
440 (<code>bool</code>s are typically defined as <code>char</code>s). So it would be good for someone
441 to review the ordering of the variables, to see how much alignment padding can
442 be removed.</p>
444 </p>
445 <h2><a name="bincompat_functions">bincompat functions</a></h2>
446 <p>There are lots of functions which are retained for binary compatibility.
447 Clean these up. Move them to mathom.c, and don't compile for blead?</p>
449 </p>
450 <h2><a name="am_i_hot_or_not">am I hot or not?</a></h2>
451 <p>The idea of <em>pp_hot.c</em> is that it contains the <em>hot</em> ops, the ops that are
452 most commonly used. The idea is that by grouping them, their object code will
453 be adjacent in the executable, so they have a greater chance of already being
454 in the CPU cache (or swapped in) due to being near another op already in use.</p>
455 <p>Except that it's not clear if these really are the most commonly used ops. So
456 anyone feeling like exercising their skill with coverage and profiling tools
457 might want to determine what ops <em>really</em> are the most commonly used. And in
458 turn suggest evictions and promotions to achieve a better <em>pp_hot.c</em>.</p>
460 </p>
461 <h2><a name="emulate_the_perthread_memory_pool_on_unix">emulate the per-thread memory pool on Unix</a></h2>
462 <p>For Windows, ithreads allocates memory for each thread from a separate pool,
463 which it discards at thread exit. It also checks that memory is free()d to
464 the correct pool. Neither check is done on Unix, so code developed there won't
465 be subject to such strictures, so can harbour bugs that only show up when the
466 code reaches Windows.</p>
467 <p>It would be good to be able to optionally emulate the Window pool system on
468 Unix, to let developers who only have access to Unix, or want to use
469 Unix-specific debugging tools, check for these problems. To do this would
470 involve figuring out how the <code>PerlMem_*</code> macros wrap <code>malloc()</code> access, and
471 providing a layer that records/checks the identity of the thread making the
472 call, and recording all the memory allocated by each thread via this API so
473 that it can be summarily free()d at thread exit. One implementation idea
474 would be to increase the size of allocation, and store the <code>my_perl</code> pointer
475 (to identify the thread) at the start, along with pointers to make a linked
476 list of blocks for this thread. To avoid alignment problems it would be
477 necessary to do something like</p>
478 <pre>
479 union memory_header_padded {
480 struct memory_header {
481 void *thread_id; /* For my_perl */
482 void *next; /* Pointer to next block for this thread */
483 } data;
484 long double padding; /* whatever type has maximal alignment constraint */
485 };</pre>
486 <p>although <code>long double</code> might not be the only type to add to the padding
487 union.</p>
489 </p>
490 <h2><a name="reduce_duplication_in_sv_setsv_flags">reduce duplication in sv_setsv_flags</a></h2>
491 <p><code>Perl_sv_setsv_flags</code> has a comment
492 <code>/* There's a lot of redundancy below but we're going for speed here */</code></p>
493 <p>Whilst this was true 10 years ago, the growing disparity between RAM and CPU
494 speeds mean that the trade offs have changed. In addition, the duplicate code
495 adds to the maintenance burden. It would be good to see how much of the
496 redundancy can be pruned, particular in the less common paths. (Profiling
497 tools at the ready...). For example, why does the test for
498 ``Can't redefine active sort subroutine'' need to occur in two places?</p>
500 </p>
501 <hr />
502 <h1><a name="tasks_that_need_a_knowledge_of_xs">Tasks that need a knowledge of XS</a></h1>
503 <p>These tasks would need C knowledge, and roughly the level of knowledge of
504 the perl API that comes from writing modules that use XS to interface to
505 C.</p>
507 </p>
508 <h2><a name="ipv6">IPv6</a></h2>
509 <p>Clean this up. Check everything in core works</p>
511 </p>
512 <h2><a name="shrink_gvs__cvs">shrink <code>GV</code>s, <code>CV</code>s</a></h2>
513 <p>By removing unused elements and careful re-ordering, the structures for <code>AV</code>s
514 and <code>HV</code>s have recently been shrunk considerably. It's probable that the same
515 approach would find savings in <code>GV</code>s and <code>CV</code>s, if not all the other
516 larger-than-<code>PVMG</code> types.</p>
518 </p>
519 <h2><a name="merge_perl_sv_2_inpu_v">merge Perl_sv_2[inpu]v</a></h2>
520 <p>There's a lot of code shared between <code>Perl_sv_2iv_flags</code>,
521 <code>Perl_sv_2uv_flags</code>, <code>Perl_sv_2nv</code>, and <code>Perl_sv_2pv_flags</code>. It would be
522 interesting to see if some of it can be merged into common shared static
523 functions. In particular, <code>Perl_sv_2uv_flags</code> started out as a cut&amp;paste
524 from <code>Perl_sv_2iv_flags</code> around 5.005_50 time, and it may be possible to
525 replace both with a single function that returns a value or union which is
526 split out by the macros in <em>sv.h</em></p>
528 </p>
529 <h2><a name="utf8_caching_code">UTF8 caching code</a></h2>
530 <p>The string position/offset cache is not optional. It should be.</p>
532 </p>
533 <h2><a name="implicit_latin_1____unicode_translation">Implicit Latin 1 =&gt; Unicode translation</a></h2>
534 <p>Conversions from byte strings to UTF-8 currently map high bit characters
535 to Unicode without translation (or, depending on how you look at it, by
536 implicitly assuming that the byte strings are in Latin-1). As perl assumes
537 the C locale by default, upgrading a string to UTF-8 may change the
538 meaning of its contents regarding character classes, case mapping, etc.
539 This should probably emit a warning (at least).</p>
540 <p>This task is incremental - even a little bit of work on it will help.</p>
542 </p>
543 <h2><a name="autovivification">autovivification</a></h2>
544 <p>Make all autovivification consistent w.r.t LVALUE/RVALUE and strict/no strict;</p>
545 <p>This task is incremental - even a little bit of work on it will help.</p>
547 </p>
548 <h2><a name="unicode_in_filenames">Unicode in Filenames</a></h2>
549 <p>chdir, chmod, chown, chroot, exec, glob, link, lstat, mkdir, open,
550 opendir, qx, readdir, readlink, rename, rmdir, stat, symlink, sysopen,
551 system, truncate, unlink, utime, -X. All these could potentially accept
552 Unicode filenames either as input or output (and in the case of system
553 and qx Unicode in general, as input or output to/from the shell).
554 Whether a filesystem - an operating system pair understands Unicode in
555 filenames varies.</p>
556 <p>Known combinations that have some level of understanding include
557 Microsoft NTFS, Apple HFS+ (In Mac OS 9 and X) and Apple UFS (in Mac
558 OS X), NFS v4 is rumored to be Unicode, and of course Plan 9. How to
559 create Unicode filenames, what forms of Unicode are accepted and used
560 (UCS-2, UTF-16, UTF-8), what (if any) is the normalization form used,
561 and so on, varies. Finding the right level of interfacing to Perl
562 requires some thought. Remember that an OS does not implicate a
563 filesystem.</p>
564 <p>(The Windows -C command flag ``wide API support'' has been at least
565 temporarily retired in 5.8.1, and the -C has been repurposed, see
566 <a href="file://C|\msysgit\mingw\html/pod/perlrun.html">the perlrun manpage</a>.)</p>
568 </p>
569 <h2><a name="unicode_in__env">Unicode in %ENV</a></h2>
570 <p>Currently the %ENV entries are always byte strings.</p>
572 </p>
573 <h2><a name="use_less__memory_">use less 'memory'</a></h2>
574 <p>Investigate trade offs to switch out perl's choices on memory usage.
575 Particularly perl should be able to give memory back.</p>
576 <p>This task is incremental - even a little bit of work on it will help.</p>
578 </p>
579 <h2><a name="reimplement__unique_in_a_way_that_is_actually_threadsafe">Re-implement <code>:unique</code> in a way that is actually thread-safe</a></h2>
580 <p>The old implementation made bad assumptions on several levels. A good 90%
581 solution might be just to make <code>:unique</code> work to share the string buffer
582 of SvPVs. That way large constant strings can be shared between ithreads,
583 such as the configuration information in <em>Config</em>.</p>
585 </p>
586 <h2><a name="make_tainting_consistent">Make tainting consistent</a></h2>
587 <p>Tainting would be easier to use if it didn't take documented shortcuts and
588 allow taint to ``leak'' everywhere within an expression.</p>
590 </p>
591 <h2><a name="readpipe_list_"><code>readpipe(LIST)</code></a></h2>
592 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_system"><code>system()</code></a> accepts a LIST syntax (and a PROGRAM LIST syntax) to avoid
593 running a shell. <code>readpipe()</code> (the function behind qx//) could be similarly
594 extended.</p>
596 </p>
597 <hr />
598 <h1><a name="tasks_that_need_a_knowledge_of_the_interpreter">Tasks that need a knowledge of the interpreter</a></h1>
599 <p>These tasks would need C knowledge, and knowledge of how the interpreter works,
600 or a willingness to learn.</p>
602 </p>
603 <h2><a name="lexical_pragmas">lexical pragmas</a></h2>
604 <p>Document the new support for lexical pragmas in 5.9.3 and how %^H works.
605 Maybe <code>re</code>, <code>encoding</code>, maybe other pragmas could be made lexical.</p>
607 </p>
608 <h2><a name="attach_detach_debugger_from_running_program">Attach/detach debugger from running program</a></h2>
609 <p>The old perltodo notes ``With <code>gdb</code>, you can attach the debugger to a running
610 program if you pass the process ID. It would be good to do this with the Perl
611 debugger on a running Perl program, although I'm not sure how it would be
612 done.'' ssh and screen do this with named pipes in /tmp. Maybe we can too.</p>
614 </p>
615 <h2><a name="constant_folding">Constant folding</a></h2>
616 <p>The peephole optimiser should trap errors during constant folding, and give
617 up on the folding, rather than bailing out at compile time. It is quite
618 possible that the unfoldable constant is in unreachable code, eg something
619 akin to <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item__a"><code>$a = 0/0 if 0;</code></a></p>
621 </p>
622 <h2><a name="lvalue_functions_for_lists">LVALUE functions for lists</a></h2>
623 <p>The old perltodo notes that lvalue functions don't work for list or hash
624 slices. This would be good to fix.</p>
626 </p>
627 <h2><a name="lvalue_functions_in_the_debugger">LVALUE functions in the debugger</a></h2>
628 <p>The old perltodo notes that lvalue functions don't work in the debugger. This
629 would be good to fix.</p>
631 </p>
632 <h2><a name="__prototype_character">_ prototype character</a></h2>
633 <p>Study the possibility of adding a new prototype character, <code>_</code>, meaning
634 ``this argument defaults to $_''.</p>
636 </p>
637 <h2><a name="state_variables">state variables</a></h2>
638 <p><code>my $foo if 0;</code> is deprecated, and should be replaced with
639 <code>state $x = &quot;initial value\n&quot;;</code> the syntax from Perl 6.</p>
641 </p>
642 <h2><a name="_inc_source_filter_to_filter__simple">@INC source filter to Filter::Simple</a></h2>
643 <p>The second return value from a sub in @INC can be a source filter. This isn't
644 documented. It should be changed to use Filter::Simple, tested and documented.</p>
646 </p>
647 <h2><a name="regexp_optimiser_optional">regexp optimiser optional</a></h2>
648 <p>The regexp optimiser is not optional. It should configurable to be, to allow
649 its performance to be measured, and its bugs to be easily demonstrated.</p>
651 </p>
652 <h2><a name="unitcheck">UNITCHECK</a></h2>
653 <p>Introduce a new special block, UNITCHECK, which is run at the end of a
654 compilation unit (module, file, <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eval"><code>eval(STRING)</code></a> block). This will correspond to
655 the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the
656 O.pm/B.pm backend framework depends on it.</p>
658 </p>
659 <h2><a name="optional_optimizer">optional optimizer</a></h2>
660 <p>Make the peephole optimizer optional. Currently it performs two tasks as
661 it walks the optree - genuine peephole optimisations, and necessary fixups of
662 ops. It would be good to find an efficient way to switch out the
663 optimisations whilst keeping the fixups.</p>
665 </p>
666 <h2><a name="you_want__how__many">You WANT *how* many</a></h2>
667 <p>Currently contexts are void, scalar and list. split has a special mechanism in
668 place to pass in the number of return values wanted. It would be useful to
669 have a general mechanism for this, backwards compatible and little speed hit.
670 This would allow proposals such as short circuiting sort to be implemented
671 as a module on CPAN.</p>
673 </p>
674 <h2><a name="lexical_aliases">lexical aliases</a></h2>
675 <p>Allow lexical aliases (maybe via the syntax <code>my \$alias = \$foo</code>.</p>
677 </p>
678 <h2><a name="entersub_xs_vs_perl">entersub XS vs Perl</a></h2>
679 <p>At the moment pp_entersub is huge, and has code to deal with entering both
680 perl and XS subroutines. Subroutine implementations rarely change between
681 perl and XS at run time, so investigate using 2 ops to enter subs (one for
682 XS, one for perl) and swap between if a sub is redefined.</p>
684 </p>
685 <h2><a name="self_ties">Self ties</a></h2>
686 <p>self ties are currently illegal because they caused too many segfaults. Maybe
687 the causes of these could be tracked down and self-ties on all types re-
688 instated.</p>
690 </p>
691 <h2><a name="optimize_away___">Optimize away @_</a></h2>
692 <p>The old perltodo notes ``Look at the ''reification`` code in <code>av.c</code>''.</p>
694 </p>
695 <h2><a name="what_hooks_would_assertions_need">What hooks would assertions need?</a></h2>
696 <p>Assertions are in the core, and work. However, assertions needed to be added
697 as a core patch, rather than an XS module in ext, or a CPAN module, because
698 the core has no hooks in the necessary places. It would be useful to
699 investigate what hooks would need to be added to make it possible to provide
700 the full assertion support from a CPAN module, so that we aren't constraining
701 the imagination of future CPAN authors.</p>
703 </p>
704 <hr />
705 <h1><a name="big_projects">Big projects</a></h1>
706 <p>Tasks that will get your name mentioned in the description of the ``Highlights
707 of 5.10''</p>
709 </p>
710 <h2><a name="make_ithreads_more_robust">make ithreads more robust</a></h2>
711 <p>Generally make ithreads more robust. See also <a href="#icow">iCOW</a></p>
712 <p>This task is incremental - even a little bit of work on it will help, and
713 will be greatly appreciated.</p>
715 </p>
716 <h2><a name="icow">iCOW</a></h2>
717 <p>Sarathy and Arthur have a proposal for an improved Copy On Write which
718 specifically will be able to COW new ithreads. If this can be implemented
719 it would be a good thing.</p>
721 </p>
722 <h2><a name="________closures_in_regexps">(?{...}) closures in regexps</a></h2>
723 <p>Fix (or rewrite) the implementation of the <code>/(?{...})/</code> closures.</p>
725 </p>
726 <h2><a name="a_reentrant_regexp_engine">A re-entrant regexp engine</a></h2>
727 <p>This will allow the use of a regex from inside (?{ }), (??{ }) and
728 (?(?{ })|) constructs.</p>
729 <table border="0" width="100%" cellspacing="0" cellpadding="3">
730 <tr><td class="block" style="background-color: #cccccc" valign="middle">
731 <big><strong><span class="block">&nbsp;perltodo - Perl TO-DO List</span></strong></big>
732 </td></tr>
733 </table>
735 </body>
737 </html>