3 perltodo - Perl TO-DO List
7 This is a list of wishes for Perl. It is maintained by Nathan
8 Torkington for the Perl porters. Send updates to
9 I<perl5-porters@perl.org>. If you want to work on any of these
10 projects, be sure to check the perl5-porters archives for past ideas,
11 flames, and propaganda. This will save you time and also prevent you
12 from implementing something that Larry has already vetoed. One set
13 of archives may be found at:
15 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
20 =head2 Mailing list archives
22 Chaim suggests contacting egroup and asking them to archive the other
23 perl.org mailing lists. Probably not advocacy, but definitely
26 =head2 Bug tracking system
28 Richard Foley I<richard@perl.org> is writing one. We looked at
29 several, like gnats and the Debian system, but at the time we
30 investigated them, none met our needs. Since then, Jitterbug has
31 matured, and may be worth reinvestigation.
33 The system we've developed will eventually be recipient of perlbug
34 mail. New bugs are entered into a mysql database, and sent on to
35 perl5-porters with the subject line rewritten to include a "ticket
36 number" (unique ID for the new bug). If the incoming message already
37 had a ticket number in the subject line, then the message is logged
38 against that bug. There is a separate email interface (not forwarding
39 to p5p) that permits porters to claim, categorize, and close tickets.
41 The next desire is a web interface. It is hoped that code can be
42 reused between the mail and the web interfaces.
44 The current delay in implementation is caused by perl.org lockups.
45 One suspect is the mail handling system, possibly going into loops.
47 We're probably going to need a bugmaster, someone who will look at
48 every new "bug" and kill those that we already know about, those
49 that are not bugs at all, etc.
51 =head2 Regression Tests
53 The test suite for Perl serves two needs: ensuring features work, and
54 ensuring old bugs have not been reintroduced. Both need work.
56 Brent LaVelle (lavelle@metronet.com) has stepped forward to work on
57 performance tests and improving the size of the test suite.
63 Do the tests that come with Perl exercise every line (or every block,
64 or ...) of the Perl interpreter, and if not then how can we make them
69 No bug fixes should be made without a corresponding testsuite addition.
70 This needs a dedicated enforcer, as the current pumpking is either too
71 lazy or too stupid or both and lets enforcement wander all over the
76 Tests that fail need to be of a form that can be readily mailed
77 to perlbug and diagnosed with minimal back-and-forth's to determine
78 which test failed, due to what cause, etc.
82 We need regression/sanity tests for suidperl
84 =item The 25% slowdown from perl4 to perl5
86 This value may or may not be accurate, but it certainly is
87 eye-catching. For some things perl5 is faster than perl4, but often
88 the reliability and extensability have come at a cost of speed. The
89 benchmark suite that Gisle released earlier has been hailed as both a
90 fantastic solution and as a source of entirely meaningless figures.
91 Do we need to test "real applications"? Can you do so? Anyone have
92 machines to dedicate to the task? Identify the things that have grown
93 slower, and see if there's a way to make them faster.
99 Andy Dougherty maintain(ed|s) a list of "todo" items for the configure
100 that comes with Perl. See Porting/pumpkin.pod in the latest
105 Have "make install" give you the option to install HTML as well. This
106 would be part of Configure. Andy Wardley (certified Perl studmuffin)
107 will look into the current problems of HTML installation--is
108 'installhtml' preventing this from happening cleanly, or is pod2html
109 the problem? If the latter, Brad Appleton's pod work may fix the
116 Declare global variables (lexically or otherwise).
120 Verify complete 64 bit support so that the value of sysseek, or C<-s>, or
121 stat(), or tell can fit into a perl number without losing precision.
122 Work with the perl-64bit mailing list on perl.org.
128 =item Named prototypes
130 Add proper named prototypes that actually work usefully.
132 =item Indirect objects
134 Fix prototype bug that forgets indirect objects.
138 Prototypes for method calls.
142 Return context prototype declarations.
146 lexically-scoped subs, e.g. my sub
150 =head2 Built-in globbing
152 Currently the C<E<lt>*.cE<gt>> syntax calls the c shell. This causes
153 problems on sites without csh, systems where fork() is expensive, and
154 setuid environments. Decide between Glob::BSD and File::KGlob, move
155 it into the core, and make Perl use it for globbing. Ben Holzman and
156 Tye McQueen have claimed the pumpkin for this.
158 =head1 Perl Internals
162 C<magic_setisa> should be made to update %FIELDS [???]
164 =head2 Garbage Collection
166 There was talk of a mark-and-sweep garbage collector at TPC2, but the
167 (to users) unpredictable nature of its behaviour put some off.
168 Sarathy, I believe, did the work. Here's what he has to say:
170 Yeah, I hope to implement it someday too. The points that were
171 raised in TPC2 were all to do with calling DESTROY() methods, but
172 I think we can accomodate that by extending bless() to stash
173 extra information for objects so we track their lifetime accurately
174 for those that want their DESTROY() to be predictable (this will be
175 a speed hit, naturally, and will therefore be optional, naturally. :)
177 [N.B. Don't even ask me about this now! When I have the time to
178 write a cogent summary, I'll post it.]
180 =head2 Reliable signals
182 Sarathy and Dan Sugalski are working on this. Chip posted a patch
183 earlier, but it was not accepted into 5.005. The issue is tricky,
184 because it has the potential to greatly slow down the core.
186 There are at least three things to consider:
190 =item Alternate runops() for signal despatch
192 Sarathy and Dan are discussed this on perl5-porters.
194 =item Figure out how to die() in delayed sighandler
196 =item Add tests for Thread::Signal
198 =item Automatic tests against CPAN
200 Is there some way to automatically build all/most of CPAN with
201 the new Perl and check that the modules there pass all the tests?
205 =head2 Interpolated regex performance bugs
209 foreach $pat (@patterns) {
215 The qr// syntax added in 5.005 has solved this problem, but
216 it needs more thorough documentation.
218 =head2 Memory leaks from failed eval/regcomp
220 The only known memory leaks in Perl are in failed code or regexp
221 compilation. Fix this. Hugo Van Der Sanden will attempt this but
222 won't have tuits until January 1999.
224 =head2 Make XS easier to use
226 There was interest in SWIG from porters, but nothing has happened
229 =head2 Make embedded Perl easier to use
231 This is probably difficult for the same reasons that "XS For Dummies"
234 =head2 Namespace cleanup
236 CPP-space: restrict CPP symbols exported from headers
237 header-space: move into CORE/perl/
238 API-space: begin list of things that constitute public api
239 env-space: Configure should use PERL_CONFIG instead of CONFIG etc.
243 Complete work on safe recursive interpreters C<Perl-E<gt>new()>.
244 Sarathy says that a reference implementation exists.
248 Chris Nandor and Matthias Neeracher are working on better integrating
249 MacPerl into the Perl distribution.
253 There's a lot of documentation that comes with Perl. The quantity of
254 documentation makes it difficult for users to know which section of
255 which manpage to read in order to solve their problem. Tom
256 Christiansen has done much of the documentation work in the past.
258 =head2 A clear division into tutorial and reference
260 Some manpages (e.g., perltoot and perlreftut) clearly set out to
261 educate the reader about a subject. Other manpages (e.g., perlsub)
262 are references for which there is no tutorial, or are references with
263 a slight tutorial bent. If things are either tutorial or reference,
264 then the reader knows which manpage to read to learn about a subject,
265 and which manpage to read to learn all about an aspect of that
266 subject. Part of the solution to this is:
268 =head2 Remove the artificial distinction between operators and functions
270 History shows us that users, and often porters, aren't clear on the
271 operator-function distinction. The present split in reference
272 material between perlfunc and perlop hinders user navigation. Given
273 that perlfunc is by far the larger of the two, move operator reference
276 =head2 More tutorials
278 More documents of a tutorial nature could help. Here are some
283 =item Regular expressions
285 Robin Berjon (r.berjon@ltconsulting.net) has volunteered.
289 Mark-Jason Dominus (mjd@plover.com) has an outline for perliotut.
293 This is badly needed. There has been some discussion on the
294 subject on perl5-porters.
298 Ronald Kimball (rjk@linguist.dartmouth.edu) has volunteered.
300 =head2 Include a search tool
302 perldoc should be able to 'grep' fulltext indices of installed POD
303 files. This would let people say:
305 perldoc -find printing numbers with commas
307 and get back the perlfaq entry on 'commify'.
309 This solution, however, requires documentation to contain the keywords
310 the user is searching for. Even when the users know what they're
311 looking for, often they can't spell it.
313 =head2 Include a locate tool
315 perldoc should be able to help people find the manpages on a
316 particular high-level subject:
320 would tell them manpages, web pages, and books with material on web
321 programming. Similarly C<perldoc -find databases>, C<perldoc -find
322 references> and so on.
324 We need something in the vicinity of:
326 % perl -help random stuff
327 No documentation for perl function `random stuff' found
328 The following entry in perlfunc.pod matches /random/a:
333 Returns a random fractional number greater than or equal to C<0> and less
334 than the value of EXPR. (EXPR should be positive.) If EXPR is
335 omitted, the value C<1> is used. Automatically calls C<srand()> unless
336 C<srand()> has already been called. See also C<srand()>.
338 (Note: If your rand function consistently returns numbers that are too
339 large or too small, then your version of Perl was probably compiled
340 with the wrong number of RANDBITS.)
341 The following pod pages seem to have /stuff/a:
342 perlfunc.pod (7 hits)
343 perlfaq7.pod (6 hits)
346 perlfaq8.pod (2 hits)
348 perl5004delta.pod (1 hit)
349 perl5005delta.pod (1 hit)
351 perldelta.pod (1 hit)
358 Proceed to open perlfunc.pod? [y] n
359 Do you want to speak perl interactively? [y] n
360 Should I dial 911? [y] n
361 Do you need psychiatric help? [y] y
362 <PELIZA> Hi, what bothers you today?
363 A Python programmer in the next cubby is driving me nuts!
364 <PELIZA> Hmm, thats fixable. Just [rest censored]
366 =head2 Separate function manpages by default
368 Perl should install 'manpages' for every function/operator into the
369 3pl or 3p manual section. By default. The splitman program in the
370 Perl source distribution does the work of turning big perlfunc into
373 =head2 Users can't find the manpages
375 Make C<perldoc> tell users what they need to add to their .login or
376 .cshrc to set their MANPATH correctly.
378 =head2 Install ALL Documentation
380 Make the standard documentation kit include the VMS, OS/2, Win32,
381 Threads, etc information. installperl and pod/Makefile should know
382 enough to copy README.foo to perlfoo.pod before building everything,
385 =head2 Outstanding issues to be documented
387 Tom has a list of 5.005_5* features or changes that require
390 Create one document that coherently explains the delta between the
391 last camel release and the current release. perldelta was supposed
392 to be that, but no longer. The things in perldelta never seemed to
393 get placed in the right places in the real manpages, either. This
396 =head2 Adapt www.linuxhq.com for Perl
398 This should help glorify documentation and get more people involved in
401 =head2 Replace man with a perl program
403 Can we reimplement man in Perl? Tom has a start. I believe some of
404 the Linux systems distribute a manalike. Alternatively, build on
405 perldoc to remove the unfeatures like "is slow" and "has no apropos".
407 =head2 Unicode tutorial
409 We could use more work on helping people understand Perl's new
410 Unicode support that Larry has created.
414 =head2 Update the POSIX extension to conform with the POSIX 1003.1 Edition 2
416 The current state of the POSIX extension is as of Edition 1, 1991,
417 whereas the Edition 2 came out in 1996. ISO/IEC 9945:1-1996(E),
418 ANSI/IEEE Std 1003.1, 1996 Edition. ISBN 1-55937-573-6. The updates
419 were legion: threads, IPC, and real time extensions.
421 =head2 Module versions
423 Automate the checking of versions in the standard distribution so
424 it's easy for a pumpking to check whether CPAN has a newer version
425 that we should be including?
429 Which modules should be added to the standard distribution? This ties
430 in with the SDK discussed on the perl-sdk list at perl.org.
434 Make the profiler (Devel::DProf) part of the standard release, and
443 Implement array using vec(). Nathan Torkington has working code to
448 Implement array using substr()
452 Implement array using a file
456 Defines shift et al in terms of splice method
460 =head2 Procedural options
462 Support procedural interfaces for the common cases of Perl's
463 gratuitously OOO modules. Tom objects to "use IO::File" reading many
464 thousands of lines of code.
468 Write a module for transparent, portable remote procedure calls. (Not
469 core). This touches on the CORBA and ILU work.
471 =head2 y2k localtime/gmtime
473 Write a module, Y2k::Catch, which overloads localtime and gmtime's
474 returned year value and catches "bad" attempts to use it.
476 =head2 Export File::Find variables
478 Make File::Find export C<$name> etc manually, at least if asked to.
482 Finish a proper Ioctl module.
484 =head2 Debugger attach/detach
486 Permit a user to debug an already-running program.
488 =head2 Regular Expression debugger
490 Create a visual profiler/debugger tool that stepped you through the
491 execution of a regular expression point by point. Ilya has a module
492 to color-code and display regular expression parses and executions.
493 There's something at http://tkworld.org/ that might be a good start,
494 it's a Tk/Tcl RE wizard, that builds regexen of many flavours.
496 =head2 Alternative RE Syntax
498 Make an alternative regular expression syntax that is accessed through
499 a module. For instance,
502 $re = start_of_line()
503 ->literal("1998/10/08")
504 ->optional( whitespace() )
506 ->remember( many( or( "-", digit() ) ) );
509 print "time is $1\n";
512 Newbies to regular expressions typically only use a subset of the full
513 language. Perhaps you wouldn't have to implement the full feature set.
515 =head2 Bundled modules
517 Nicholas Clark (nick@flirble.org) had a patch for storing modules in
518 zipped format. This needs exploring and concluding.
522 Adopt IO::Tty, make it as portable as Don Libes' "expect" (can we link
523 against expect code?), and perfect a Perl version of expect. IO::Tty
524 and expect could then be distributed as part of the core distribution,
525 replacing Comm.pl and other hacks.
529 A simple-to-use interface to native graphical abilities would
530 be welcomed. Oh, Perl's access Tk is nice enough, and reasonably
531 portable, but it's not particularly as fast as one would like.
532 Simple access to the mouse's cut buffer or mouse-presses shouldn't
533 required loading a few terabytes of Tk code.
535 =head2 Update semibroken auxiliary tools; h2ph, a2p, etc.
537 Kurt Starsinic is working on h2ph. mjd has fixed bugs in a2p in the
538 past. a2p apparently doesn't work on nawk and gawk extensions.
539 Graham Barr has an Include module that does h2ph work at runtime.
541 =head2 POD Converters
543 Brad's PodParser code needs to become part of the core, and the Pod::*
544 and pod2* programs rewritten to use this standard parser. Currently
545 the converters take different options, some behave in different
546 fashions, and some are more picky than others in terms of the POD
551 A short-term fix: pod2html generates absolute HTML links. Make it
552 generate relative links.
556 Something like lint for Pod would be good. Something that catches
557 common errors as well as gross ones. Brad Appleton is putting
558 together something as part of his PodParser work.
564 Design a webperl environment that's as tightly integrated and as
565 easy-to-use as Perl's current command-line environment.
569 More work on a safe and secure execution environment for mobile
570 agents would be neat; the Safe.pm module is a start, but there's a
571 still a lot to be done in that area. Adopt Penguin?
573 =head2 POSIX on non-POSIX
575 Standard programming constructs for non-POSIX systems would help a
576 lot of programmers stuck on primitive, legacy systems. For example,
577 Microsoft still hasn't made a usable POSIX interface on their clunky
578 systems, which means that standard operations such as alarm() and
579 fork(), both critical for sophisticated client-server programming,
580 must both be kludged around.
582 I'm unsure whether Tom means to emulate alarm( )and fork(), or merely
583 to provide a document like perlport.pod to say which features are
584 portable and which are not.
586 =head2 Portable installations
588 Figure out a portable semi-gelled installation, that is, one without
589 full paths. Larry has said that he's thinking about this. Ilya
590 pointed out that perllib_mangle() is good for this.
594 =head2 Get PERL_OBJECT building under gcc
596 B<Part done>, according to Sarathy. It builds under egcs on win32,
597 but doesn't run for occult reasons. If anyone knows the right
598 breed of chicken to sacrifice, please speak up.
600 =head2 Rename new headers to be consistent with the rest
602 =head2 Sort out the spawnvp() mess
604 =head2 Work out DLL versioning
606 =head2 Get PERL_OBJECT building on non-win32
610 =head1 Would be nice to have
614 =item C<pack "(stuff)*">
616 =item Contiguous bitfields in pack/unpack
620 =item Bundled perl preprocessor
622 =item Use posix calls internally where possible
626 =item -i rename file only when successfully changed
628 =item All ARGV input should act like <>
630 =item report HANDLE [formats].
632 =item support in perlmain to rerun debugger
634 =item lvalue functions
636 Tuomas Lukka, on behalf of the PDL project, greatly desires this and
637 Ilya has a patch for it (probably against an older version of Perl).
638 Tuomas points out that what PDL really wants is lvalue I<methods>,
643 =head1 Possible pragmas
647 (use less memory, CPU)
651 =head2 constant function cache
653 =head2 foreach(reverse...)
655 =head2 Cache eval tree
657 Unless lexical outer scope used (mark in &compiling?).
661 =head2 Shrink opcode tables
663 Via multiple implementations selected in peep.
665 =head2 Cache hash value
667 Not a win, according to Guido.
669 =head2 Optimize away @_ where possible
671 =head2 Optimize sort by { $a <=> $b }
673 Greg Bacon added several more sort optimizations. These have
674 made it into 5.005_55, thanks to Hans Mulder.
676 =head2 Rewrite regexp parser for better integrated optimization
678 The regexp parser was rewritten for 5.005. Ilya's the regexp guru.
680 =head1 Vague possibilities
684 =item ref function in list context
686 This seems impossible to do without substantially breaking code.
688 =item make tr/// return histogram in list context?
690 =item Loop control on do{} et al
692 =item Explicit switch statements
694 Nobody has yet managed to come up with a switch syntax that would
695 allow for mixed hash, constant, regexp checks. Submit implementation
698 =item compile to real threaded code
700 =item structured types
702 =item Modifiable $1 et al
704 The intent is for this to be a means of editing the matched portions of
709 =head1 To Do Or Not To Do
711 These are things that have been discussed in the past and roundly
712 criticized for being of questionable value.
714 =head2 Making my() work on "package" variables
716 Being able to say my($Foo::Bar), something that sounds ludicrous and
717 the 5.006 pumpking has mocked.
719 =head2 "or" testing defined not truth
721 We tell people that C<||> can be used to give a default value to a
724 $children = shift || 5; # default is 5 children
726 which is almost (but not):
729 $children = 5 unless $children;
731 but if the first argument was given and is "0", then it will be
732 considered false by C<||> and C<5> used instead. Really we want
733 an C<||>-like operator that behaves like:
736 $children = 5 unless defined $children;
738 Namely, a C<||> that tests defined-ness rather than truth. One was
739 discussed, and a patch submitted, but the objections were many. While
740 there were objections, many still feel the need. At least it was
741 decided that C<??> is the best name for the operator.
743 =head2 "dynamic" lexicals
750 Localizing, as Tim Bunce points out, is a separate concept from
751 whether the variable is global or lexical. Chip Salzenberg had
752 an implementation once, but Larry thought it had potential to
755 =head2 "class"-based, rather than package-based "lexicals"
757 This is like what the Alias module provides, but the variables would
758 be lexicals reserved by perl at compile-time, which really are indices
759 pointing into the pseudo-hash object visible inside every method so
766 Which of the standard modules are thread-safe? Which CPAN modules?
767 How easy is it to fix those non-safe modules?
771 Threading is still experimental. Every reproducible bug identifies
772 something else for us to fix. Find and submit more of these problems.
778 Consistent semantics for exit/die in threads.
780 =head2 External threads
782 Better support for externally created threads.
788 Spot-check globals like statcache and global GVs for thread-safety.
789 "B<Part done>", says Sarathy.
791 =head2 Per-thread GVs
793 According to Sarathy, this would make @_ be the same in threaded
794 and non-threaded, as well as helping solve problems like filehandles
795 (the same filehandle currently cannot be used in two threads).
801 The compiler's back-end code-generators for creating bytecode or
802 compilable C code could use optimization work.
806 Figure out how and where byteperl will be built for the various
809 =head2 Precompiled modules
811 Save byte-compiled modules on disk.
815 Auto-produce executable.
817 =head2 Typed lexicals
819 Typed lexicals should affect B::CC::load_pad.
823 Workarounds to help Win32 dynamic loading.
827 END blocks need saving in compiled output.
835 Fix comppadlist (names in comppad_name can have fake SvCUR
836 from where newASSIGNOP steals the field).
838 =head2 Cached compilation
840 Can we install modules as bytecode?
842 =head1 Recently Finished Tasks
844 =head2 Figure a way out of $^(capital letter)
846 Figure out a clean way to extend $^(capital letter) beyond
847 the 26 alphabets. (${^WORD} maybe?)
849 Mark-Jason Dominus sent a patch which went into 5.005_56.
853 Make filenames in the distribution and in the standard module set
854 be 8.3 friendly where feasible. Good luck changing the standard
855 modules, though. B<Done>.
857 =head2 Proper tied array support
859 This was B<done> in 5.005 by Nick Ing-Simmons.
863 Perl should be more generous in accepting foreign line terminations.
864 Mostly B<done> in 5.005.
866 =head2 Namespace cleanup
868 symbol-space: "pl_" prefix for all global vars
869 "Perl_" prefix for all functions
871 CPP-space: stop malloc()/free() pollution unless asked
875 Given a piece of Perl code, say what it does. B::Deparse is doing
880 Rename and alter ISA.pm. B<Done>. It is now base.pm.
882 =head2 Automate maintenance of most PERL_OBJECT code
884 B<Done>, says Sarathy.
888 Added in 5.004_70. B<Done>
894 =head2 reference to compiled regexp
896 B<done> This is the qr// support in 5.005.
898 =head2 eval qw() at compile time
900 qw() is presently compiled as a call to split. This means the split
901 happens at runtime. Change this so qw() is compiled as a real list
902 assignment. This also avoids surprises like:
904 $a = () = qw(What will $a hold?);
906 B<Done>. Tom Hughes submitted a patch that went into 5.005_55.
910 B<Done>. This is the Fatal.pm module, so any builtin that that does
911 not return success automatically die()s. If you're feeling brave, tie
912 this in with the unified exceptions scheme.
914 =head2 Status variable
916 $^C to track compiler/checker status. B<Done> in 5.005_54.