This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove "Remove duplication of test setup" from the todo list.
[perl5.git] / Porting / todo.pod
CommitLineData
7711098a
GS
1=head1 NAME
2
c3143508 3todo - Perl TO-DO list
7711098a
GS
4
5=head1 DESCRIPTION
e50bb9a1 6
049aabcb 7This is a list of wishes for Perl. The most up to date version of this file
c3143508 8is at L<http://perl5.git.perl.org/perl.git/blob_plain/HEAD:/Porting/todo.pod>
049aabcb
NC
9
10The tasks we think are smaller or easier are listed first. Anyone is welcome
11to work on any of these, but it's a good idea to first contact
12I<perl5-porters@perl.org> to avoid duplication of effort, and to learn from
13any previous attempts. By all means contact a pumpking privately first if you
14prefer.
e50bb9a1 15
0bdfc961
NC
16Whilst patches to make the list shorter are most welcome, ideas to add to
17the list are also encouraged. Check the perl5-porters archives for past
b4af8972
RB
18ideas, and any discussion about them. One set of archives may be found at
19L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/>
938c8732 20
617eabfa
NC
21What can we offer you in return? Fame, fortune, and everlasting glory? Maybe
22not, but if your patch is incorporated, then we'll add your name to the
23F<AUTHORS> file, which ships in the official distribution. How many other
24programming languages offer you 1 line of immortality?
938c8732 25
0bdfc961 26=head1 Tasks that only need Perl knowledge
e50bb9a1 27
de2b17d8
NC
28=head2 Migrate t/ from custom TAP generation
29
30Many tests below F<t/> still generate TAP by "hand", rather than using library
96090e4f 31functions. As explained in L<perlhack/TESTING>, tests in F<t/> are
de2b17d8
NC
32written in a particular way to test that more complex constructions actually
33work before using them routinely. Hence they don't use C<Test::More>, but
34instead there is an intentionally simpler library, F<t/test.pl>. However,
35quite a few tests in F<t/> have not been refactored to use it. Refactoring
36any of these tests, one at a time, is a useful thing TODO.
37
0d8e5a42
RGS
38The subdirectories F<base>, F<cmd> and F<comp>, that contain the most
39basic tests, should be excluded from this task.
40
0be987a2
NC
41=head2 Automate perldelta generation
42
43The perldelta file accompanying each release summaries the major changes.
44It's mostly manually generated currently, but some of that could be
45automated with a bit of perl, specifically the generation of
46
47=over
48
49=item Modules and Pragmata
50
51=item New Documentation
52
53=item New Tests
54
55=back
56
57See F<Porting/how_to_write_a_perldelta.pod> for details.
58
87a942b1 59=head2 POD -E<gt> HTML conversion in the core still sucks
e50bb9a1 60
938c8732 61Which is crazy given just how simple POD purports to be, and how simple HTML
adebf063
NC
62can be. It's not actually I<as> simple as it sounds, particularly with the
63flexibility POD allows for C<=item>, but it would be good to improve the
64visual appeal of the HTML generated, and to avoid it having any validation
65errors. See also L</make HTML install work>, as the layout of installation tree
66is needed to improve the cross-linking.
938c8732 67
dc0fb092
SP
68The addition of C<Pod::Simple> and its related modules may make this task
69easier to complete.
70
0bdfc961 71=head2 Make Schwern poorer
e50bb9a1 72
613bd4f7 73We should have tests for everything. When all the core's modules are tested,
0bdfc961
NC
74Schwern has promised to donate to $500 to TPF. We may need volunteers to
75hold him upside down and shake vigorously in order to actually extract the
76cash.
3958b146 77
0bdfc961 78=head2 Improve the coverage of the core tests
e50bb9a1 79
e1020413 80Use Devel::Cover to ascertain the core modules' test coverage, then add
02f21748 81tests that are currently missing.
30222c0f 82
0bdfc961 83=head2 test B
e50bb9a1 84
0bdfc961 85A full test suite for the B module would be nice.
e50bb9a1 86
0bdfc961 87=head2 A decent benchmark
e50bb9a1 88
617eabfa 89C<perlbench> seems impervious to any recent changes made to the perl core. It
0bdfc961
NC
90would be useful to have a reasonable general benchmarking suite that roughly
91represented what current perl programs do, and measurably reported whether
92tweaks to the core improve, degrade or don't really affect performance, to
93guide people attempting to optimise the guts of perl. Gisle would welcome
94new tests for perlbench.
6168cf99 95
0bdfc961 96=head2 fix tainting bugs
6168cf99 97
0bdfc961
NC
98Fix the bugs revealed by running the test suite with the C<-t> switch (via
99C<make test.taintwarn>).
e50bb9a1 100
0bdfc961 101=head2 Dual life everything
e50bb9a1 102
0bdfc961
NC
103As part of the "dists" plan, anything that doesn't belong in the smallest perl
104distribution needs to be dual lifed. Anything else can be too. Figure out what
105changes would be needed to package that module and its tests up for CPAN, and
106do so. Test it with older perl releases, and fix the problems you find.
e50bb9a1 107
a393eb28
RGS
108To make a minimal perl distribution, it's useful to look at
109F<t/lib/commonsense.t>.
110
0bdfc961 111=head2 POSIX memory footprint
e50bb9a1 112
0bdfc961
NC
113Ilya observed that use POSIX; eats memory like there's no tomorrow, and at
114various times worked to cut it down. There is probably still fat to cut out -
115for example POSIX passes Exporter some very memory hungry data structures.
e50bb9a1 116
eed36644
NC
117=head2 embed.pl/makedef.pl
118
119There is a script F<embed.pl> that generates several header files to prefix
120all of Perl's symbols in a consistent way, to provide some semblance of
121namespace support in C<C>. Functions are declared in F<embed.fnc>, variables
907b3e23 122in F<interpvar.h>. Quite a few of the functions and variables
eed36644
NC
123are conditionally declared there, using C<#ifdef>. However, F<embed.pl>
124doesn't understand the C macros, so the rules about which symbols are present
125when is duplicated in F<makedef.pl>. Writing things twice is bad, m'kay.
126It would be good to teach C<embed.pl> to understand the conditional
127compilation, and hence remove the duplication, and the mistakes it has caused.
e50bb9a1 128
801de10e
NC
129=head2 use strict; and AutoLoad
130
131Currently if you write
132
133 package Whack;
134 use AutoLoader 'AUTOLOAD';
135 use strict;
136 1;
137 __END__
138 sub bloop {
139 print join (' ', No, strict, here), "!\n";
140 }
141
142then C<use strict;> isn't in force within the autoloaded subroutines. It would
143be more consistent (and less surprising) to arrange for all lexical pragmas
144in force at the __END__ block to be in force within each autoloaded subroutine.
145
773b3597
RGS
146There's a similar problem with SelfLoader.
147
91d0cbf6
NC
148=head2 profile installman
149
150The F<installman> script is slow. All it is doing text processing, which we're
151told is something Perl is good at. So it would be nice to know what it is doing
152that is taking so much CPU, and where possible address it.
153
c69ca1d4 154=head2 enable lexical enabling/disabling of individual warnings
a9ed9b74
JV
155
156Currently, warnings can only be enabled or disabled by category. There
157are times when it would be useful to quash a single warning, not a
158whole category.
91d0cbf6 159
85234543
KW
160=head2 document diagnostics
161
162Many diagnostic messages are not currently documented. The list is at the end
163of t/porting/diag.t.
164
0bdfc961 165=head1 Tasks that need a little sysadmin-type knowledge
e50bb9a1 166
0bdfc961
NC
167Or if you prefer, tasks that you would learn from, and broaden your skills
168base...
e50bb9a1 169
cd793d32 170=head2 make HTML install work
e50bb9a1 171
78b489b0 172There is an C<install.html> target in the Makefile. It's marked as
adebf063
NC
173"experimental". It would be good to get this tested, make it work reliably, and
174remove the "experimental" tag. This would include
175
176=over 4
177
178=item 1
179
180Checking that cross linking between various parts of the documentation works.
181In particular that links work between the modules (files with POD in F<lib/>)
182and the core documentation (files in F<pod/>)
183
184=item 2
185
78b489b0
NC
186Improving the code that split C<perlfunc> into chunks, preferably with
187general case code added to L<Pod::Functions> that could be used elsewhere.
188
617eabfa
NC
189Challenges here are correctly identifying the groups of functions that go
190together, and making the right named external cross-links point to the right
78b489b0
NC
191page. Currently this works reasonably well in the general case, and correctly
192parses two or more C<=items> giving the different parameter lists for the
193same function, such used by C<substr>. However it fails completely where
194I<different> functions are listed as a sequence of C<=items> but share the
195same description. All the functions from C<getpwnam> to C<endprotoent> have
196individual stub pages, with only the page for C<endservent> holding the
197description common to all. Likewise C<q>, C<qq> and C<qw> have stub pages,
198instead of sharing the body of C<qx>.
199
200Note also the current code isn't ideal with the two forms of C<select>, mushing
201them both into one F<select.html> with the two descriptions run together.
202Fixing this may well be a special case.
adebf063
NC
203
204=back
3a89a73c 205
0bdfc961
NC
206=head2 compressed man pages
207
208Be able to install them. This would probably need a configure test to see how
209the system does compressed man pages (same directory/different directory?
210same filename/different filename), as well as tweaking the F<installman> script
211to compress as necessary.
212
30222c0f
NC
213=head2 Add a code coverage target to the Makefile
214
215Make it easy for anyone to run Devel::Cover on the core's tests. The steps
216to do this manually are roughly
217
218=over 4
219
220=item *
221
222do a normal C<Configure>, but include Devel::Cover as a module to install
f11a3063 223(see L<INSTALL> for how to do this)
30222c0f
NC
224
225=item *
226
227 make perl
228
229=item *
230
231 cd t; HARNESS_PERL_SWITCHES=-MDevel::Cover ./perl -I../lib harness
232
233=item *
234
235Process the resulting Devel::Cover database
236
237=back
238
239This just give you the coverage of the F<.pm>s. To also get the C level
240coverage you need to
241
242=over 4
243
244=item *
245
246Additionally tell C<Configure> to use the appropriate C compiler flags for
247C<gcov>
248
249=item *
250
251 make perl.gcov
252
253(instead of C<make perl>)
254
255=item *
256
257After running the tests run C<gcov> to generate all the F<.gcov> files.
258(Including down in the subdirectories of F<ext/>
259
260=item *
261
262(From the top level perl directory) run C<gcov2perl> on all the C<.gcov> files
263to get their stats into the cover_db directory.
264
265=item *
266
267Then process the Devel::Cover database
268
269=back
270
271It would be good to add a single switch to C<Configure> to specify that you
272wanted to perform perl level coverage, and another to specify C level
273coverage, and have C<Configure> and the F<Makefile> do all the right things
274automatically.
275
02f21748 276=head2 Make Config.pm cope with differences between built and installed perl
0bdfc961
NC
277
278Quite often vendors ship a perl binary compiled with their (pay-for)
279compilers. People install a free compiler, such as gcc. To work out how to
280build extensions, Perl interrogates C<%Config>, so in this situation
281C<%Config> describes compilers that aren't there, and extension building
282fails. This forces people into choosing between re-compiling perl themselves
283using the compiler they have, or only using modules that the vendor ships.
284
285It would be good to find a way teach C<Config.pm> about the installation setup,
286possibly involving probing at install time or later, so that the C<%Config> in
287a binary distribution better describes the installed machine, when the
288installed machine differs from the build machine in some significant way.
289
728f4ecd
NC
290=head2 linker specification files
291
292Some platforms mandate that you provide a list of a shared library's external
293symbols to the linker, so the core already has the infrastructure in place to
294do this for generating shared perl libraries. My understanding is that the
295GNU toolchain can accept an optional linker specification file, and restrict
296visibility just to symbols declared in that file. It would be good to extend
297F<makedef.pl> to support this format, and to provide a means within
298C<Configure> to enable it. This would allow Unix users to test that the
299export list is correct, and to build a perl that does not pollute the global
32d539f5
RU
300namespace with private symbols, and will fail in the same way as msvc or mingw
301builds or when using PERL_DL_NONLAZY=1.
728f4ecd 302
a229ae3b
RGS
303=head2 Cross-compile support
304
305Currently C<Configure> understands C<-Dusecrosscompile> option. This option
306arranges for building C<miniperl> for TARGET machine, so this C<miniperl> is
307assumed then to be copied to TARGET machine and used as a replacement of full
308C<perl> executable.
309
d1307786 310This could be done little differently. Namely C<miniperl> should be built for
a229ae3b 311HOST and then full C<perl> with extensions should be compiled for TARGET.
d1307786 312This, however, might require extra trickery for %Config: we have one config
87a942b1
JH
313first for HOST and then another for TARGET. Tools like MakeMaker will be
314mightily confused. Having around two different types of executables and
315libraries (HOST and TARGET) makes life interesting for Makefiles and
316shell (and Perl) scripts. There is $Config{run}, normally empty, which
317can be used as an execution wrapper. Also note that in some
318cross-compilation/execution environments the HOST and the TARGET do
319not see the same filesystem(s), the $Config{run} may need to do some
320file/directory copying back and forth.
0bdfc961 321
98fca0e8
NC
322=head2 Split "linker" from "compiler"
323
324Right now, Configure probes for two commands, and sets two variables:
325
326=over 4
327
b91dd380 328=item * C<cc> (in F<cc.U>)
98fca0e8
NC
329
330This variable holds the name of a command to execute a C compiler which
331can resolve multiple global references that happen to have the same
332name. Usual values are F<cc> and F<gcc>.
333Fervent ANSI compilers may be called F<c89>. AIX has F<xlc>.
334
b91dd380 335=item * C<ld> (in F<dlsrc.U>)
98fca0e8
NC
336
337This variable indicates the program to be used to link
338libraries for dynamic loading. On some systems, it is F<ld>.
339On ELF systems, it should be C<$cc>. Mostly, we'll try to respect
340the hint file setting.
341
342=back
343
8d159ec1
NC
344There is an implicit historical assumption from around Perl5.000alpha
345something, that C<$cc> is also the correct command for linking object files
346together to make an executable. This may be true on Unix, but it's not true
347on other platforms, and there are a maze of work arounds in other places (such
348as F<Makefile.SH>) to cope with this.
98fca0e8
NC
349
350Ideally, we should create a new variable to hold the name of the executable
351linker program, probe for it in F<Configure>, and centralise all the special
352case logic there or in hints files.
353
354A small bikeshed issue remains - what to call it, given that C<$ld> is already
8d159ec1
NC
355taken (arguably for the wrong thing now, but on SunOS 4.1 it is the command
356for creating dynamically-loadable modules) and C<$link> could be confused with
357the Unix command line executable of the same name, which does something
358completely different. Andy Dougherty makes the counter argument "In parrot, I
359tried to call the command used to link object files and libraries into an
360executable F<link>, since that's what my vaguely-remembered DOS and VMS
361experience suggested. I don't think any real confusion has ensued, so it's
362probably a reasonable name for perl5 to use."
98fca0e8
NC
363
364"Alas, I've always worried that introducing it would make things worse,
365since now the module building utilities would have to look for
366C<$Config{link}> and institute a fall-back plan if it weren't found."
8d159ec1
NC
367Although I can see that as confusing, given that C<$Config{d_link}> is true
368when (hard) links are available.
98fca0e8 369
75585ce3
SP
370=head2 Configure Windows using PowerShell
371
372Currently, Windows uses hard-coded config files based to build the
373config.h for compiling Perl. Makefiles are also hard-coded and need to be
374hand edited prior to building Perl. While this makes it easy to create a perl.exe
375that works across multiple Windows versions, being able to accurately
376configure a perl.exe for a specific Windows versions and VS C++ would be
377a nice enhancement. With PowerShell available on Windows XP and up, this
378may now be possible. Step 1 might be to investigate whether this is possible
379and use this to clean up our current makefile situation. Step 2 would be to
380see if there would be a way to use our existing metaconfig units to configure a
381Windows Perl or whether we go in a separate direction and make it so. Of
382course, we all know what step 3 is.
383
0bdfc961
NC
384=head1 Tasks that need a little C knowledge
385
386These tasks would need a little C knowledge, but don't need any specific
387background or experience with XS, or how the Perl interpreter works
388
3d826b29
NC
389=head2 Weed out needless PERL_UNUSED_ARG
390
391The C code uses the macro C<PERL_UNUSED_ARG> to stop compilers warning about
392unused arguments. Often the arguments can't be removed, as there is an
393external constraint that determines the prototype of the function, so this
394approach is valid. However, there are some cases where C<PERL_UNUSED_ARG>
395could be removed. Specifically
396
397=over 4
398
399=item *
400
401The prototypes of (nearly all) static functions can be changed
402
403=item *
404
405Unused arguments generated by short cut macros are wasteful - the short cut
406macro used can be changed.
407
408=back
409
bcbaa2d5
RGS
410=head2 -Duse32bit*
411
412Natively 64-bit systems need neither -Duse64bitint nor -Duse64bitall.
413On these systems, it might be the default compilation mode, and there
414is currently no guarantee that passing no use64bitall option to the
415Configure process will build a 32bit perl. Implementing -Duse32bit*
fd2dadea 416options would be nice for perl 5.14.
bcbaa2d5 417
fee0a0f7 418=head2 Profile Perl - am I hot or not?
62403a3c 419
fee0a0f7
NC
420The Perl source code is stable enough that it makes sense to profile it,
421identify and optimise the hotspots. It would be good to measure the
422performance of the Perl interpreter using free tools such as cachegrind,
423gprof, and dtrace, and work to reduce the bottlenecks they reveal.
424
425As part of this, the idea of F<pp_hot.c> is that it contains the I<hot> ops,
426the ops that are most commonly used. The idea is that by grouping them, their
427object code will be adjacent in the executable, so they have a greater chance
428of already being in the CPU cache (or swapped in) due to being near another op
429already in use.
62403a3c
NC
430
431Except that it's not clear if these really are the most commonly used ops. So
fee0a0f7
NC
432as part of exercising your skills with coverage and profiling tools you might
433want to determine what ops I<really> are the most commonly used. And in turn
434suggest evictions and promotions to achieve a better F<pp_hot.c>.
62403a3c 435
91d0cbf6
NC
436One piece of Perl code that might make a good testbed is F<installman>.
437
98fed0ad
NC
438=head2 Allocate OPs from arenas
439
440Currently all new OP structures are individually malloc()ed and free()d.
441All C<malloc> implementations have space overheads, and are now as fast as
442custom allocates so it would both use less memory and less CPU to allocate
443the various OP structures from arenas. The SV arena code can probably be
444re-used for this.
445
539f2c54
JC
446Note that Configuring perl with C<-Accflags=-DPL_OP_SLAB_ALLOC> will use
447Perl_Slab_alloc() to pack optrees into a contiguous block, which is
448probably superior to the use of OP arenas, esp. from a cache locality
449standpoint. See L<Profile Perl - am I hot or not?>.
450
a229ae3b 451=head2 Improve win32/wince.c
0bdfc961 452
a229ae3b 453Currently, numerous functions look virtually, if not completely,
c23989d1 454identical in both F<win32/wince.c> and F<win32/win32.c> files, which can't
6d71adcd
NC
455be good.
456
c5b31784
SH
457=head2 Use secure CRT functions when building with VC8 on Win32
458
459Visual C++ 2005 (VC++ 8.x) deprecated a number of CRT functions on the basis
460that they were "unsafe" and introduced differently named secure versions of
461them as replacements, e.g. instead of writing
462
463 FILE* f = fopen(__FILE__, "r");
464
465one should now write
466
467 FILE* f;
468 errno_t err = fopen_s(&f, __FILE__, "r");
469
470Currently, the warnings about these deprecations have been disabled by adding
471-D_CRT_SECURE_NO_DEPRECATE to the CFLAGS. It would be nice to remove that
472warning suppressant and actually make use of the new secure CRT functions.
473
474There is also a similar issue with POSIX CRT function names like fileno having
475been deprecated in favour of ISO C++ conformant names like _fileno. These
26a6faa8 476warnings are also currently suppressed by adding -D_CRT_NONSTDC_NO_DEPRECATE. It
c5b31784
SH
477might be nice to do as Microsoft suggest here too, although, unlike the secure
478functions issue, there is presumably little or no benefit in this case.
479
038ae9a4
SH
480=head2 Fix POSIX::access() and chdir() on Win32
481
482These functions currently take no account of DACLs and therefore do not behave
483correctly in situations where access is restricted by DACLs (as opposed to the
484read-only attribute).
485
486Furthermore, POSIX::access() behaves differently for directories having the
487read-only attribute set depending on what CRT library is being used. For
488example, the _access() function in the VC6 and VC7 CRTs (wrongly) claim that
489such directories are not writable, whereas in fact all directories are writable
490unless access is denied by DACLs. (In the case of directories, the read-only
491attribute actually only means that the directory cannot be deleted.) This CRT
492bug is fixed in the VC8 and VC9 CRTs (but, of course, the directory may still
493not actually be writable if access is indeed denied by DACLs).
494
495For the chdir() issue, see ActiveState bug #74552:
b4af8972 496L<http://bugs.activestate.com/show_bug.cgi?id=74552>
038ae9a4
SH
497
498Therefore, DACLs should be checked both for consistency across CRTs and for
499the correct answer.
500
501(Note that perl's -w operator should not be modified to check DACLs. It has
502been written so that it reflects the state of the read-only attribute, even
503for directories (whatever CRT is being used), for symmetry with chmod().)
504
16815324
NC
505=head2 strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()
506
507Maybe create a utility that checks after each libperl.a creation that
508none of the above (nor sprintf(), vsprintf(), or *SHUDDER* gets())
509ever creep back to libperl.a.
510
511 nm libperl.a | ./miniperl -alne '$o = $F[0] if /:$/; print "$o $F[1]" if $F[0] eq "U" && $F[1] =~ /^(?:strn?c(?:at|py)|v?sprintf|gets)$/'
512
513Note, of course, that this will only tell whether B<your> platform
514is using those naughty interfaces.
515
de96509d
JH
516=head2 -D_FORTIFY_SOURCE=2, -fstack-protector
517
518Recent glibcs support C<-D_FORTIFY_SOURCE=2> and recent gcc
519(4.1 onwards?) supports C<-fstack-protector>, both of which give
520protection against various kinds of buffer overflow problems.
521These should probably be used for compiling Perl whenever available,
522Configure and/or hints files should be adjusted to probe for the
523availability of these features and enable them as appropriate.
16815324 524
8964cfe0
NC
525=head2 Arenas for GPs? For MAGIC?
526
527C<struct gp> and C<struct magic> are both currently allocated by C<malloc>.
528It might be a speed or memory saving to change to using arenas. Or it might
529not. It would need some suitable benchmarking first. In particular, C<GP>s
530can probably be changed with minimal compatibility impact (probably nothing
531outside of the core, or even outside of F<gv.c> allocates them), but they
532probably aren't allocated/deallocated often enough for a speed saving. Whereas
533C<MAGIC> is allocated/deallocated more often, but in turn, is also something
534more externally visible, so changing the rules here may bite external code.
535
3880c8ec
NC
536=head2 Shared arenas
537
538Several SV body structs are now the same size, notably PVMG and PVGV, PVAV and
539PVHV, and PVCV and PVFM. It should be possible to allocate and return same
540sized bodies from the same actual arena, rather than maintaining one arena for
541each. This could save 4-6K per thread, of memory no longer tied up in the
542not-yet-allocated part of an arena.
543
8964cfe0 544
6d71adcd
NC
545=head1 Tasks that need a knowledge of XS
546
547These tasks would need C knowledge, and roughly the level of knowledge of
548the perl API that comes from writing modules that use XS to interface to
549C.
550
e851c105
DG
551=head2 Write an XS cookbook
552
553Create pod/perlxscookbook.pod with short, task-focused 'recipes' in XS that
554demonstrate common tasks and good practices. (Some of these might be
555extracted from perlguts.) The target audience should be XS novices, who need
556more examples than perlguts but something less overwhelming than perlapi.
557Recipes should provide "one pretty good way to do it" instead of TIMTOWTDI.
558
5b7d14ff
DG
559Rather than focusing on interfacing Perl to C libraries, such a cookbook
560should probably focus on how to optimize Perl routines by re-writing them
561in XS. This will likely be more motivating to those who mostly work in
562Perl but are looking to take the next step into XS.
563
564Deconstructing and explaining some simpler XS modules could be one way to
565bootstrap a cookbook. (List::Util? Class::XSAccessor? Tree::Ternary_XS?)
566Another option could be deconstructing the implementation of some simpler
567functions in op.c.
568
0b162fb0 569=head2 Document how XSUBs can use C<cv_set_call_checker> to inline themselves as OPs
05fb4e20
NC
570
571For a simple XSUB, often the subroutine dispatch takes more time than the
0b162fb0
NC
572XSUB itself. v5.14.0 now allows XSUBs to register a function which will be
573called when the parser is finished building an C<entersub> op which calls
574them.
575
576Registration is done with C<Perl_cv_set_call_checker>, is documented at the
577API level in L<perlapi>, and L<perl5140delta/Custom per-subroutine check hooks>
578notes that it can be used to inline a subroutine, by replacing it with a
579custom op. However there is no further detail of the code needed to do this.
580It would be useful to add one or more annotated examples of how to create
581XSUBs that inline.
582
583This should provide a measurable speed up to simple XSUBs inside
05fb4e20
NC
584tight loops. Initially one would have to write the OP alternative
585implementation by hand, but it's likely that this should be reasonably
586straightforward for the type of XSUB that would benefit the most. Longer
587term, once the run-time implementation is proven, it should be possible to
588progressively update ExtUtils::ParseXS to generate OP implementations for
589some XSUBs.
590
318bf708
NC
591=head2 Remove the use of SVs as temporaries in dump.c
592
593F<dump.c> contains debugging routines to dump out the contains of perl data
594structures, such as C<SV>s, C<AV>s and C<HV>s. Currently, the dumping code
595B<uses> C<SV>s for its temporary buffers, which was a logical initial
596implementation choice, as they provide ready made memory handling.
597
598However, they also lead to a lot of confusion when it happens that what you're
599trying to debug is seen by the code in F<dump.c>, correctly or incorrectly, as
600a temporary scalar it can use for a temporary buffer. It's also not possible
601to dump scalars before the interpreter is properly set up, such as during
602ithreads cloning. It would be good to progressively replace the use of scalars
603as string accumulation buffers with something much simpler, directly allocated
604by C<malloc>. The F<dump.c> code is (or should be) only producing 7 bit
605US-ASCII, so output character sets are not an issue.
606
607Producing and proving an internal simple buffer allocation would make it easier
608to re-write the internals of the PerlIO subsystem to avoid using C<SV>s for
609B<its> buffers, use of which can cause problems similar to those of F<dump.c>,
610at similar times.
611
5d96f598
NC
612=head2 safely supporting POSIX SA_SIGINFO
613
614Some years ago Jarkko supplied patches to provide support for the POSIX
615SA_SIGINFO feature in Perl, passing the extra data to the Perl signal handler.
616
617Unfortunately, it only works with "unsafe" signals, because under safe
618signals, by the time Perl gets to run the signal handler, the extra
619information has been lost. Moreover, it's not easy to store it somewhere,
620as you can't call mutexs, or do anything else fancy, from inside a signal
621handler.
622
623So it strikes me that we could provide safe SA_SIGINFO support
624
625=over 4
626
627=item 1
628
629Provide global variables for two file descriptors
630
631=item 2
632
633When the first request is made via C<sigaction> for C<SA_SIGINFO>, create a
634pipe, store the reader in one, the writer in the other
635
636=item 3
637
638In the "safe" signal handler (C<Perl_csighandler()>/C<S_raise_signal()>), if
639the C<siginfo_t> pointer non-C<NULL>, and the writer file handle is open,
640
641=over 8
642
643=item 1
644
645serialise signal number, C<struct siginfo_t> (or at least the parts we care
646about) into a small auto char buff
647
648=item 2
649
650C<write()> that (non-blocking) to the writer fd
651
652=over 12
653
654=item 1
655
656if it writes 100%, flag the signal in a counter of "signals on the pipe" akin
657to the current per-signal-number counts
658
659=item 2
660
661if it writes 0%, assume the pipe is full. Flag the data as lost?
662
663=item 3
664
665if it writes partially, croak a panic, as your OS is broken.
666
667=back
668
669=back
670
671=item 4
672
673in the regular C<PERL_ASYNC_CHECK()> processing, if there are "signals on
674the pipe", read the data out, deserialise, build the Perl structures on
675the stack (code in C<Perl_sighandler()>, the "unsafe" handler), and call as
676usual.
677
678=back
679
680I think that this gets us decent C<SA_SIGINFO> support, without the current risk
681of running Perl code inside the signal handler context. (With all the dangers
682of things like C<malloc> corruption that that currently offers us)
683
684For more information see the thread starting with this message:
b4af8972 685L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-03/msg00305.html>
5d96f598 686
6d71adcd
NC
687=head2 autovivification
688
689Make all autovivification consistent w.r.t LVALUE/RVALUE and strict/no strict;
690
691This task is incremental - even a little bit of work on it will help.
692
693=head2 Unicode in Filenames
694
695chdir, chmod, chown, chroot, exec, glob, link, lstat, mkdir, open,
696opendir, qx, readdir, readlink, rename, rmdir, stat, symlink, sysopen,
697system, truncate, unlink, utime, -X. All these could potentially accept
698Unicode filenames either as input or output (and in the case of system
699and qx Unicode in general, as input or output to/from the shell).
700Whether a filesystem - an operating system pair understands Unicode in
701filenames varies.
702
703Known combinations that have some level of understanding include
704Microsoft NTFS, Apple HFS+ (In Mac OS 9 and X) and Apple UFS (in Mac
705OS X), NFS v4 is rumored to be Unicode, and of course Plan 9. How to
706create Unicode filenames, what forms of Unicode are accepted and used
707(UCS-2, UTF-16, UTF-8), what (if any) is the normalization form used,
708and so on, varies. Finding the right level of interfacing to Perl
709requires some thought. Remember that an OS does not implicate a
710filesystem.
711
712(The Windows -C command flag "wide API support" has been at least
713temporarily retired in 5.8.1, and the -C has been repurposed, see
714L<perlrun>.)
715
87a942b1
JH
716Most probably the right way to do this would be this:
717L</"Virtualize operating system access">.
718
6d71adcd
NC
719=head2 Unicode in %ENV
720
721Currently the %ENV entries are always byte strings.
87a942b1 722See L</"Virtualize operating system access">.
6d71adcd 723
1f2e7916
JD
724=head2 Unicode and glob()
725
726Currently glob patterns and filenames returned from File::Glob::glob()
87a942b1 727are always byte strings. See L</"Virtualize operating system access">.
1f2e7916 728
6d71adcd
NC
729=head2 use less 'memory'
730
731Investigate trade offs to switch out perl's choices on memory usage.
732Particularly perl should be able to give memory back.
733
734This task is incremental - even a little bit of work on it will help.
735
736=head2 Re-implement C<:unique> in a way that is actually thread-safe
737
738The old implementation made bad assumptions on several levels. A good 90%
739solution might be just to make C<:unique> work to share the string buffer
740of SvPVs. That way large constant strings can be shared between ithreads,
741such as the configuration information in F<Config>.
742
743=head2 Make tainting consistent
744
745Tainting would be easier to use if it didn't take documented shortcuts and
746allow taint to "leak" everywhere within an expression.
747
748=head2 readpipe(LIST)
749
750system() accepts a LIST syntax (and a PROGRAM LIST syntax) to avoid
751running a shell. readpipe() (the function behind qx//) could be similarly
752extended.
753
6d71adcd
NC
754=head2 Audit the code for destruction ordering assumptions
755
756Change 25773 notes
757
758 /* Need to check SvMAGICAL, as during global destruction it may be that
759 AvARYLEN(av) has been freed before av, and hence the SvANY() pointer
760 is now part of the linked list of SV heads, rather than pointing to
761 the original body. */
762 /* FIXME - audit the code for other bugs like this one. */
763
764adding the C<SvMAGICAL> check to
765
766 if (AvARYLEN(av) && SvMAGICAL(AvARYLEN(av))) {
767 MAGIC *mg = mg_find (AvARYLEN(av), PERL_MAGIC_arylen);
768
769Go through the core and look for similar assumptions that SVs have particular
770types, as all bets are off during global destruction.
771
749904bf
JH
772=head2 Extend PerlIO and PerlIO::Scalar
773
774PerlIO::Scalar doesn't know how to truncate(). Implementing this
775would require extending the PerlIO vtable.
776
777Similarly the PerlIO vtable doesn't know about formats (write()), or
778about stat(), or chmod()/chown(), utime(), or flock().
779
780(For PerlIO::Scalar it's hard to see what e.g. mode bits or ownership
781would mean.)
782
783PerlIO doesn't do directories or symlinks, either: mkdir(), rmdir(),
784opendir(), closedir(), seekdir(), rewinddir(), glob(); symlink(),
785readlink().
786
94da6c29
JH
787See also L</"Virtualize operating system access">.
788
3236f110
NC
789=head2 -C on the #! line
790
791It should be possible to make -C work correctly if found on the #! line,
792given that all perl command line options are strict ASCII, and -C changes
793only the interpretation of non-ASCII characters, and not for the script file
794handle. To make it work needs some investigation of the ordering of function
795calls during startup, and (by implication) a bit of tweaking of that order.
796
d6c1e11f
JH
797=head2 Organize error messages
798
799Perl's diagnostics (error messages, see L<perldiag>) could use
a8d0aeb9 800reorganizing and formalizing so that each error message has its
d6c1e11f
JH
801stable-for-all-eternity unique id, categorized by severity, type, and
802subsystem. (The error messages would be listed in a datafile outside
c4bd451b
CB
803of the Perl source code, and the source code would only refer to the
804messages by the id.) This clean-up and regularizing should apply
d6c1e11f
JH
805for all croak() messages.
806
807This would enable all sorts of things: easier translation/localization
808of the messages (though please do keep in mind the caveats of
809L<Locale::Maketext> about too straightforward approaches to
810translation), filtering by severity, and instead of grepping for a
811particular error message one could look for a stable error id. (Of
812course, changing the error messages by default would break all the
813existing software depending on some particular error message...)
814
815This kind of functionality is known as I<message catalogs>. Look for
816inspiration for example in the catgets() system, possibly even use it
817if available-- but B<only> if available, all platforms will B<not>
de96509d 818have catgets().
d6c1e11f
JH
819
820For the really pure at heart, consider extending this item to cover
821also the warning messages (see L<perllexwarn>, C<warnings.pl>).
3236f110 822
0bdfc961 823=head1 Tasks that need a knowledge of the interpreter
3298bd4d 824
0bdfc961
NC
825These tasks would need C knowledge, and knowledge of how the interpreter works,
826or a willingness to learn.
3298bd4d 827
10517af5
JD
828=head2 forbid labels with keyword names
829
830Currently C<goto keyword> "computes" the label value:
831
832 $ perl -e 'goto print'
833 Can't find label 1 at -e line 1.
834
343c8006
JD
835It is controversial if the right way to avoid the confusion is to forbid
836labels with keyword names, or if it would be better to always treat
837bareword expressions after a "goto" as a label and never as a keyword.
10517af5 838
de6375e3
RGS
839=head2 truncate() prototype
840
841The prototype of truncate() is currently C<$$>. It should probably
842be C<*$> instead. (This is changed in F<opcode.pl>)
843
2d0587d8
RGS
844=head2 decapsulation of smart match argument
845
846Currently C<$foo ~~ $object> will die with the message "Smart matching a
847non-overloaded object breaks encapsulation". It would be nice to allow
c69ca1d4 848to bypass this by using explicitly the syntax C<$foo ~~ %$object> or
2d0587d8
RGS
849C<$foo ~~ @$object>.
850
565590b5
NC
851=head2 error reporting of [$a ; $b]
852
853Using C<;> inside brackets is a syntax error, and we don't propose to change
854that by giving it any meaning. However, it's not reported very helpfully:
855
856 $ perl -e '$a = [$b; $c];'
857 syntax error at -e line 1, near "$b;"
858 syntax error at -e line 1, near "$c]"
859 Execution of -e aborted due to compilation errors.
860
861It should be possible to hook into the tokeniser or the lexer, so that when a
862C<;> is parsed where it is not legal as a statement terminator (ie inside
863C<{}> used as a hashref, C<[]> or C<()>) it issues an error something like
864I<';' isn't legal inside an expression - if you need multiple statements use a
865do {...} block>. See the thread starting at
b4af8972 866L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-09/msg00573.html>
565590b5 867
718140ec
NC
868=head2 lexicals used only once
869
870This warns:
871
872 $ perl -we '$pie = 42'
873 Name "main::pie" used only once: possible typo at -e line 1.
874
875This does not:
876
877 $ perl -we 'my $pie = 42'
878
879Logically all lexicals used only once should warn, if the user asks for
d6f4ea2e
SP
880warnings. An unworked RT ticket (#5087) has been open for almost seven
881years for this discrepancy.
718140ec 882
a3d15f9a
RGS
883=head2 UTF-8 revamp
884
85c006b6
KW
885The handling of Unicode is unclean in many places. In the regex engine
886there are especially many problems. The swash data structure could be
887replaced my something better. Inversion lists and maps are likely
888candidates. The whole Unicode database could be placed in-core for a
889huge speed-up. Only minimal work was done on the optimizer when utf8
890was added, with the result that the synthetic start class often will
891fail to narrow down the possible choices when given non-Latin1 input.
a3d15f9a
RGS
892
893=head2 Properly Unicode safe tokeniser and pads.
894
895The tokeniser isn't actually very UTF-8 clean. C<use utf8;> is a hack -
896variable names are stored in stashes as raw bytes, without the utf-8 flag
897set. The pad API only takes a C<char *> pointer, so that's all bytes too. The
898tokeniser ignores the UTF-8-ness of C<PL_rsfp>, or any SVs returned from
899source filters. All this could be fixed.
900
636e63cb
NC
901=head2 state variable initialization in list context
902
903Currently this is illegal:
904
905 state ($a, $b) = foo();
906
a2874905 907In Perl 6, C<state ($a) = foo();> and C<(state $a) = foo();> have different
a8d0aeb9 908semantics, which is tricky to implement in Perl 5 as currently they produce
a2874905 909the same opcode trees. The Perl 6 design is firm, so it would be good to
a8d0aeb9 910implement the necessary code in Perl 5. There are comments in
a2874905
NC
911C<Perl_newASSIGNOP()> that show the code paths taken by various assignment
912constructions involving state variables.
636e63cb 913
4fedb12c
RGS
914=head2 Implement $value ~~ 0 .. $range
915
916It would be nice to extend the syntax of the C<~~> operator to also
917understand numeric (and maybe alphanumeric) ranges.
a393eb28
RGS
918
919=head2 A does() built-in
920
921Like ref(), only useful. It would call the C<DOES> method on objects; it
922would also tell whether something can be dereferenced as an
923array/hash/etc., or used as a regexp, etc.
924L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-03/msg00481.html>
925
926=head2 Tied filehandles and write() don't mix
927
928There is no method on tied filehandles to allow them to be called back by
929formats.
4fedb12c 930
53967bb9
RGS
931=head2 Propagate compilation hints to the debugger
932
933Currently a debugger started with -dE on the command-line doesn't see the
934features enabled by -E. More generally hints (C<$^H> and C<%^H>) aren't
935propagated to the debugger. Probably it would be a good thing to propagate
936hints from the innermost non-C<DB::> scope: this would make code eval'ed
937in the debugger see the features (and strictures, etc.) currently in
938scope.
939
d10fc472 940=head2 Attach/detach debugger from running program
1626a787 941
cd793d32
NC
942The old perltodo notes "With C<gdb>, you can attach the debugger to a running
943program if you pass the process ID. It would be good to do this with the Perl
0bdfc961
NC
944debugger on a running Perl program, although I'm not sure how it would be
945done." ssh and screen do this with named pipes in /tmp. Maybe we can too.
1626a787 946
0bdfc961
NC
947=head2 LVALUE functions for lists
948
949The old perltodo notes that lvalue functions don't work for list or hash
950slices. This would be good to fix.
951
0bdfc961
NC
952=head2 regexp optimiser optional
953
954The regexp optimiser is not optional. It should configurable to be, to allow
955its performance to be measured, and its bugs to be easily demonstrated.
956
ef36c6a7
RGS
957=head2 C</w> regex modifier
958
959That flag would enable to match whole words, and also to interpolate
960arrays as alternations. With it, C</P/w> would be roughly equivalent to:
961
962 do { local $"='|'; /\b(?:P)\b/ }
963
b4af8972
RB
964See
965L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-01/msg00400.html>
ef36c6a7
RGS
966for the discussion.
967
0bdfc961
NC
968=head2 optional optimizer
969
970Make the peephole optimizer optional. Currently it performs two tasks as
971it walks the optree - genuine peephole optimisations, and necessary fixups of
972ops. It would be good to find an efficient way to switch out the
973optimisations whilst keeping the fixups.
974
975=head2 You WANT *how* many
976
977Currently contexts are void, scalar and list. split has a special mechanism in
978place to pass in the number of return values wanted. It would be useful to
979have a general mechanism for this, backwards compatible and little speed hit.
980This would allow proposals such as short circuiting sort to be implemented
981as a module on CPAN.
982
983=head2 lexical aliases
984
985Allow lexical aliases (maybe via the syntax C<my \$alias = \$foo>.
986
987=head2 entersub XS vs Perl
988
989At the moment pp_entersub is huge, and has code to deal with entering both
990perl and XS subroutines. Subroutine implementations rarely change between
991perl and XS at run time, so investigate using 2 ops to enter subs (one for
992XS, one for perl) and swap between if a sub is redefined.
2810d901 993
de535794 994=head2 Self-ties
2810d901 995
de535794 996Self-ties are currently illegal because they caused too many segfaults. Maybe
a8d0aeb9 997the causes of these could be tracked down and self-ties on all types
de535794 998reinstated.
0bdfc961
NC
999
1000=head2 Optimize away @_
1001
1002The old perltodo notes "Look at the "reification" code in C<av.c>".
1003
87a942b1
JH
1004=head2 Virtualize operating system access
1005
1006Implement a set of "vtables" that virtualizes operating system access
1007(open(), mkdir(), unlink(), readdir(), getenv(), etc.) At the very
1008least these interfaces should take SVs as "name" arguments instead of
1009bare char pointers; probably the most flexible and extensible way
e1a3d5d1
JH
1010would be for the Perl-facing interfaces to accept HVs. The system
1011needs to be per-operating-system and per-file-system
1012hookable/filterable, preferably both from XS and Perl level
87a942b1
JH
1013(L<perlport/"Files and Filesystems"> is good reading at this point,
1014in fact, all of L<perlport> is.)
1015
e1a3d5d1
JH
1016This has actually already been implemented (but only for Win32),
1017take a look at F<iperlsys.h> and F<win32/perlhost.h>. While all Win32
1018variants go through a set of "vtables" for operating system access,
e1020413 1019non-Win32 systems currently go straight for the POSIX/Unix-style
e1a3d5d1
JH
1020system/library call. Similar system as for Win32 should be
1021implemented for all platforms. The existing Win32 implementation
1022probably does not need to survive alongside this proposed new
1023implementation, the approaches could be merged.
87a942b1
JH
1024
1025What would this give us? One often-asked-for feature this would
94da6c29
JH
1026enable is using Unicode for filenames, and other "names" like %ENV,
1027usernames, hostnames, and so forth.
1028(See L<perlunicode/"When Unicode Does Not Happen">.)
1029
1030But this kind of virtualization would also allow for things like
1031virtual filesystems, virtual networks, and "sandboxes" (though as long
1032as dynamic loading of random object code is allowed, not very safe
1033sandboxes since external code of course know not of Perl's vtables).
1034An example of a smaller "sandbox" is that this feature can be used to
1035implement per-thread working directories: Win32 already does this.
1036
1037See also L</"Extend PerlIO and PerlIO::Scalar">.
87a942b1 1038
057163d7
NC
1039=head2 Store the current pad in the OP slab allocator
1040
1041=for clarification
1042I hope that I got that "current pad" part correct
1043
1044Currently we leak ops in various cases of parse failure. I suggested that we
1045could solve this by always using the op slab allocator, and walking it to
1046free ops. Dave comments that as some ops are already freed during optree
1047creation one would have to mark which ops are freed, and not double free them
1048when walking the slab. He notes that one problem with this is that for some ops
1049you have to know which pad was current at the time of allocation, which does
1050change. I suggested storing a pointer to the current pad in the memory allocated
1051for the slab, and swapping to a new slab each time the pad changes. Dave thinks
1052that this would work.
1053
52960e22
JC
1054=head2 repack the optree
1055
1056Repacking the optree after execution order is determined could allow
057163d7
NC
1057removal of NULL ops, and optimal ordering of OPs with respect to cache-line
1058filling. The slab allocator could be reused for this purpose. I think that
1059the best way to do this is to make it an optional step just before the
1060completed optree is attached to anything else, and to use the slab allocator
1061unchanged, so that freeing ops is identical whether or not this step runs.
1062Note that the slab allocator allocates ops downwards in memory, so one would
1063have to actually "allocate" the ops in reverse-execution order to get them
1064contiguous in memory in execution order.
1065
b4af8972
RB
1066See
1067L<http://www.nntp.perl.org/group/perl.perl5.porters/2007/12/msg131975.html>
057163d7
NC
1068
1069Note that running this copy, and then freeing all the old location ops would
1070cause their slabs to be freed, which would eliminate possible memory wastage if
1071the previous suggestion is implemented, and we swap slabs more frequently.
52960e22 1072
12e06b6f
NC
1073=head2 eliminate incorrect line numbers in warnings
1074
1075This code
1076
1077 use warnings;
1078 my $undef;
1079
1080 if ($undef == 3) {
1081 } elsif ($undef == 0) {
1082 }
1083
18a16cc5 1084used to produce this output:
12e06b6f
NC
1085
1086 Use of uninitialized value in numeric eq (==) at wrong.pl line 4.
1087 Use of uninitialized value in numeric eq (==) at wrong.pl line 4.
1088
18a16cc5
NC
1089where the line of the second warning was misreported - it should be line 5.
1090Rafael fixed this - the problem arose because there was no nextstate OP
1091between the execution of the C<if> and the C<elsif>, hence C<PL_curcop> still
1092reports that the currently executing line is line 4. The solution was to inject
1093a nextstate OPs for each C<elsif>, although it turned out that the nextstate
1094OP needed to be a nulled OP, rather than a live nextstate OP, else other line
1095numbers became misreported. (Jenga!)
12e06b6f
NC
1096
1097The problem is more general than C<elsif> (although the C<elsif> case is the
1098most common and the most confusing). Ideally this code
1099
1100 use warnings;
1101 my $undef;
1102
1103 my $a = $undef + 1;
1104 my $b
1105 = $undef
1106 + 1;
1107
1108would produce this output
1109
1110 Use of uninitialized value $undef in addition (+) at wrong.pl line 4.
1111 Use of uninitialized value $undef in addition (+) at wrong.pl line 7.
1112
1113(rather than lines 4 and 5), but this would seem to require every OP to carry
1114(at least) line number information.
1115
1116What might work is to have an optional line number in memory just before the
1117BASEOP structure, with a flag bit in the op to say whether it's present.
1118Initially during compile every OP would carry its line number. Then add a late
1119pass to the optimiser (potentially combined with L</repack the optree>) which
1120looks at the two ops on every edge of the graph of the execution path. If
1121the line number changes, flags the destination OP with this information.
1122Once all paths are traced, replace every op with the flag with a
1123nextstate-light op (that just updates C<PL_curcop>), which in turn then passes
1124control on to the true op. All ops would then be replaced by variants that
1125do not store the line number. (Which, logically, why it would work best in
1126conjunction with L</repack the optree>, as that is already copying/reallocating
1127all the OPs)
1128
18a16cc5
NC
1129(Although I should note that we're not certain that doing this for the general
1130case is worth it)
1131
52960e22
JC
1132=head2 optimize tail-calls
1133
1134Tail-calls present an opportunity for broadly applicable optimization;
1135anywhere that C<< return foo(...) >> is called, the outer return can
1136be replaced by a goto, and foo will return directly to the outer
1137caller, saving (conservatively) 25% of perl's call&return cost, which
1138is relatively higher than in C. The scheme language is known to do
1139this heavily. B::Concise provides good insight into where this
1140optimization is possible, ie anywhere entersub,leavesub op-sequence
1141occurs.
1142
1143 perl -MO=Concise,-exec,a,b,-main -e 'sub a{ 1 }; sub b {a()}; b(2)'
1144
1145Bottom line on this is probably a new pp_tailcall function which
1146combines the code in pp_entersub, pp_leavesub. This should probably
1147be done 1st in XS, and using B::Generate to patch the new OP into the
1148optrees.
1149
0c397127
KW
1150=head2 Add C<00dddd>
1151
1152It has been proposed that octal constants be specifiable through the syntax
1153C<0oddddd>, parallel to the existing construct to specify hex constants
1154C<0xddddd>
1155
0bdfc961
NC
1156=head1 Big projects
1157
1158Tasks that will get your name mentioned in the description of the "Highlights
fd2dadea 1159of 5.14"
0bdfc961
NC
1160
1161=head2 make ithreads more robust
1162
4e577f8b 1163Generally make ithreads more robust. See also L</iCOW>
0bdfc961
NC
1164
1165This task is incremental - even a little bit of work on it will help, and
1166will be greatly appreciated.
1167
07577ec1
FC
1168One bit would be to determine how to clone directory handles on systems
1169without a C<fchdir> function (in sv.c:Perl_dirp_dup).
6c047da7 1170
59c7f7d5
RGS
1171Fix Perl_sv_dup, et al so that threads can return objects.
1172
0bdfc961
NC
1173=head2 iCOW
1174
1175Sarathy and Arthur have a proposal for an improved Copy On Write which
1176specifically will be able to COW new ithreads. If this can be implemented
1177it would be a good thing.
1178
1179=head2 (?{...}) closures in regexps
1180
1181Fix (or rewrite) the implementation of the C</(?{...})/> closures.
1182
6bda09f9
YO
1183=head2 Add class set operations to regexp engine
1184
1185Apparently these are quite useful. Anyway, Jeffery Friedl wants them.
1186
1187demerphq has this on his todo list, but right at the bottom.
44a7a252
JV
1188
1189
1190=head1 Tasks for microperl
1191
1192
1193[ Each and every one of these may be obsolete, but they were listed
1194 in the old Todo.micro file]
1195
1196
1197=head2 make creating uconfig.sh automatic
1198
1199=head2 make creating Makefile.micro automatic
1200
1201=head2 do away with fork/exec/wait?
1202
1203(system, popen should be enough?)
1204
1205=head2 some of the uconfig.sh really needs to be probed (using cc) in buildtime:
1206
1207(uConfigure? :-) native datatype widths and endianness come to mind
1208