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 is the recipient of perlbug mail, and any
34 followups it generates from perl5-porters. New bugs are entered
35 into a mysql database, and sent on to
36 perl5-porters with the subject line rewritten to include a "ticket
37 number" (unique ID for the new bug). If the incoming message already
38 had a ticket number in the subject line, then the message is logged
39 against that bug. There is a separate email interface (not forwarding
40 to p5p) that permits porters to claim, categorize, and close tickets.
42 There is also a web interface to the system at http://bugs.perl.org.
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 still desperately 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 extensibility 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
118 =item Named prototypes
120 Add proper named prototypes that actually work usefully.
122 =item Indirect objects
124 Fix prototype bug that forgets indirect objects.
128 Prototypes for method calls.
132 Return context prototype declarations.
136 lexically-scoped subs, e.g. my sub
140 =head1 Perl Internals
144 C<magic_setisa> should be made to update %FIELDS [???]
146 =head2 Garbage Collection
148 There was talk of a mark-and-sweep garbage collector at TPC2, but the
149 (to users) unpredictable nature of its behaviour put some off.
150 Sarathy, I believe, did the work. Here's what he has to say:
152 Yeah, I hope to implement it someday too. The points that were
153 raised in TPC2 were all to do with calling DESTROY() methods, but
154 I think we can accommodate that by extending bless() to stash
155 extra information for objects so we track their lifetime accurately
156 for those that want their DESTROY() to be predictable (this will be
157 a speed hit, naturally, and will therefore be optional, naturally. :)
159 [N.B. Don't even ask me about this now! When I have the time to
160 write a cogent summary, I'll post it.]
162 =head2 Reliable signals
164 Mostly done in Perl 5.8, there is now a reliable signal handler
165 despatch. No measurable slowdown detected in Linux or Solaris
166 with the 5.8 approach (implemented by Nick I-S).
168 There are at least three things to consider:
172 =item Alternate runops() for signal despatch
174 Sarathy and Dan discussed this on perl5-porters.
176 =item Figure out how to die() in delayed sighandler
178 =item Add tests for Thread::Signal
180 =item Automatic tests against CPAN
182 Is there some way to automatically build all/most of CPAN with
183 the new Perl and check that the modules there pass all the tests?
187 =head2 Interpolated regex performance bugs
191 foreach $pat (@patterns) {
197 The qr// syntax added in 5.005 has solved this problem, but
198 it needs more thorough documentation.
200 =head2 Memory leaks from failed eval/regcomp
202 The only known memory leaks in Perl are in failed code or regexp
203 compilation. Fix this.
205 Noticed in Perl 5.6: Also local()ising tied variables leak.
207 =head2 Make XS easier to use
209 There was interest in SWIG from porters, but nothing has happened
212 New development in 2001: the Inline module, when it gels, shows great
215 =head2 Make embedded Perl easier to use
217 This is probably difficult for the same reasons that "XS For Dummies"
220 =head2 Namespace cleanup
222 CPP-space: restrict CPP symbols exported from headers
223 header-space: move into CORE/perl/
224 API-space: begin list of things that constitute public api
225 env-space: Configure should use PERL_CONFIG instead of CONFIG etc.
229 Complete work on safe recursive interpreters C<Perl-E<gt>new()>.
230 Sarathy says that a reference implementation exists.
234 Chris Nandor and Matthias Neeracher are working on better integrating
235 MacPerl into the Perl distribution.
239 There's a lot of documentation that comes with Perl. The quantity of
240 documentation makes it difficult for users to know which section of
241 which manpage to read in order to solve their problem. Tom
242 Christiansen has done much of the documentation work in the past.
244 =head2 A clear division into tutorial and reference
246 Some manpages (e.g., perltoot and perlreftut) clearly set out to
247 educate the reader about a subject. Other manpages (e.g., perlsub)
248 are references for which there is no tutorial, or are references with
249 a slight tutorial bent. If things are either tutorial or reference,
250 then the reader knows which manpage to read to learn about a subject,
251 and which manpage to read to learn all about an aspect of that
252 subject. Part of the solution to this is:
254 =head2 Remove the artificial distinction between operators and functions
256 History shows us that users, and often porters, aren't clear on the
257 operator-function distinction. The present split in reference
258 material between perlfunc and perlop hinders user navigation. Given
259 that perlfunc is by far the larger of the two, move operator reference
262 =head2 More tutorials
264 More documents of a tutorial nature could help. Here are some
271 Mark-Jason Dominus (mjd@plover.com) has an outline for perliotut.
275 This is badly needed. There has been some discussion on the
276 subject on perl5-porters.
280 Ronald Kimball (rjk@linguist.dartmouth.edu) has volunteered.
284 =head2 Include a search tool
286 perldoc should be able to 'grep' fulltext indices of installed POD
287 files. This would let people say:
289 perldoc -find printing numbers with commas
291 and get back the perlfaq entry on 'commify'.
293 This solution, however, requires documentation to contain the keywords
294 the user is searching for. Even when the users know what they're
295 looking for, often they can't spell it.
297 =head2 Include a locate tool
299 perldoc should be able to help people find the manpages on a
300 particular high-level subject:
304 would tell them manpages, web pages, and books with material on web
305 programming. Similarly C<perldoc -find databases>, C<perldoc -find
306 references> and so on.
308 We need something in the vicinity of:
310 % perl -help random stuff
311 No documentation for perl function `random stuff' found
312 The following entry in perlfunc.pod matches /random/a:
317 Returns a random fractional number greater than or equal to C<0> and less
318 than the value of EXPR. (EXPR should be positive.) If EXPR is
319 omitted, the value C<1> is used. Automatically calls C<srand()> unless
320 C<srand()> has already been called. See also C<srand()>.
322 (Note: If your rand function consistently returns numbers that are too
323 large or too small, then your version of Perl was probably compiled
324 with the wrong number of RANDBITS.)
325 The following pod pages seem to have /stuff/a:
326 perlfunc.pod (7 hits)
327 perlfaq7.pod (6 hits)
330 perlfaq8.pod (2 hits)
332 perl5004delta.pod (1 hit)
333 perl5005delta.pod (1 hit)
335 perldelta.pod (1 hit)
342 Proceed to open perlfunc.pod? [y] n
343 Do you want to speak perl interactively? [y] n
344 Should I dial 911? [y] n
345 Do you need psychiatric help? [y] y
346 <PELIZA> Hi, what bothers you today?
347 A Python programmer in the next cubby is driving me nuts!
348 <PELIZA> Hmm, thats fixable. Just [rest censored]
350 =head2 Separate function manpages by default
352 Perl should install 'manpages' for every function/operator into the
353 3pl or 3p manual section. By default. The splitman program in the
354 Perl source distribution does the work of turning big perlfunc into
357 =head2 Users can't find the manpages
359 Make C<perldoc> tell users what they need to add to their .login or
360 .cshrc to set their MANPATH correctly.
362 =head2 Outstanding issues to be documented
364 Tom has a list of 5.005_5* features or changes that require
367 Create one document that coherently explains the delta between the
368 last camel release and the current release. perldelta was supposed
369 to be that, but no longer. The things in perldelta never seemed to
370 get placed in the right places in the real manpages, either. This
373 =head2 Adapt www.linuxhq.com for Perl
375 This should help glorify documentation and get more people involved in
378 =head2 Replace man with a perl program
380 Can we reimplement man in Perl? Tom has a start. I believe some of
381 the Linux systems distribute a manalike. Alternatively, build on
382 perldoc to remove the unfeatures like "is slow" and "has no apropos".
384 =head2 Unicode tutorial
386 We could use more work on helping people understand Perl's new
387 Unicode support that Larry has created.
391 =head2 Update the POSIX extension to conform with the POSIX 1003.1 Edition 2
393 The current state of the POSIX extension is as of Edition 1, 1991,
394 whereas the Edition 2 came out in 1996. ISO/IEC 9945:1-1996(E),
395 ANSI/IEEE Std 1003.1, 1996 Edition. ISBN 1-55937-573-6. The updates
396 were legion: threads, IPC, and real time extensions.
398 =head2 Module versions
400 Automate the checking of versions in the standard distribution so
401 it's easy for a pumpking to check whether CPAN has a newer version
402 that we should be including?
406 Which modules should be added to the standard distribution? This ties
407 in with the SDK discussed on the perl-sdk list at perl.org.
411 Devel::DProf requires more documentation.
419 Implement array using vec(). Nathan Torkington has working code to
424 Implement array using substr()
428 Implement array using a file
432 Defines shift et al in terms of splice method
436 =head2 Procedural options
438 Support procedural interfaces for the common cases of Perl's
439 gratuitously OOO modules. Tom objects to "use IO::File" reading many
440 thousands of lines of code.
444 Write a module for transparent, portable remote procedure calls. (Not
445 core). This touches on the CORBA and ILU work.
447 =head2 Export File::Find variables
449 Make File::Find export C<$name> etc manually, at least if asked to.
453 Finish a proper Ioctl module.
455 =head2 Debugger attach/detach
457 Permit a user to debug an already-running program.
459 =head2 Alternative RE Syntax
461 Make an alternative regular expression syntax that is accessed through
462 a module. For instance,
465 $re = start_of_line()
466 ->literal("1998/10/08")
467 ->optional( whitespace() )
469 ->remember( many( or( "-", digit() ) ) );
472 print "time is $1\n";
475 Newbies to regular expressions typically only use a subset of the full
476 language. Perhaps you wouldn't have to implement the full feature set.
478 =head2 Bundled modules
480 Nicholas Clark (nick@flirble.org) had a patch for storing modules in
481 zipped format. This needs exploring and concluding.
485 Adopt IO::Tty, make it as portable as Don Libes' "expect" (can we link
486 against expect code?), and perfect a Perl version of expect. IO::Tty
487 and expect could then be distributed as part of the core distribution,
488 replacing Comm.pl and other hacks.
492 A simple-to-use interface to native graphical abilities would
493 be welcomed. Oh, Perl's access Tk is nice enough, and reasonably
494 portable, but it's not particularly as fast as one would like.
495 Simple access to the mouse's cut buffer or mouse-presses shouldn't
496 required loading a few terabytes of Tk code.
498 =head2 Update semibroken auxiliary tools; h2ph, a2p, etc.
500 Kurt Starsinic is working on h2ph. mjd has fixed bugs in a2p in the
501 past. a2p apparently doesn't work on nawk and gawk extensions.
502 Graham Barr has an Include module that does h2ph work at runtime.
506 A short-term fix: pod2html generates absolute HTML links. Make it
507 generate relative links.
511 Something like lint for Pod would be good. Something that catches
512 common errors as well as gross ones. Brad Appleton is putting
513 together something as part of his PodParser work.
519 Design a webperl environment that's as tightly integrated and as
520 easy-to-use as Perl's current command-line environment.
524 More work on a safe and secure execution environment for mobile
525 agents would be neat; the Safe.pm module is a start, but there's a
526 still a lot to be done in that area. Adopt Penguin?
528 =head2 POSIX on non-POSIX
530 Standard programming constructs for non-POSIX systems would help a
531 lot of programmers stuck on primitive, legacy systems. For example,
532 Microsoft still hasn't made a usable POSIX interface on their clunky
533 systems, which means that standard operations such as alarm() and
534 fork(), both critical for sophisticated client-server programming,
535 must both be kludged around.
537 I'm unsure whether Tom means to emulate alarm( )and fork(), or merely
538 to provide a document like perlport.pod to say which features are
539 portable and which are not.
541 =head2 Portable installations
543 Figure out a portable semi-gelled installation, that is, one without
544 full paths. Larry has said that he's thinking about this. Ilya
545 pointed out that perllib_mangle() is good for this.
549 =head2 Rename new headers to be consistent with the rest
551 =head2 Sort out the spawnvp() mess
553 =head2 Work out DLL versioning
557 =head1 Would be nice to have
561 =item C<pack "(stuff)*">
563 =item Contiguous bitfields in pack/unpack
567 =item Bundled perl preprocessor
569 =item Use posix calls internally where possible
573 =item -i rename file only when successfully changed
575 =item All ARGV input should act like <>
577 =item report HANDLE [formats].
579 =item support in perlmain to rerun debugger
581 =item lvalue functions
583 Tuomas Lukka, on behalf of the PDL project, greatly desires this and
584 Ilya has a patch for it (probably against an older version of Perl).
585 Tuomas points out that what PDL really wants is lvalue I<methods>,
590 =head1 Possible pragmas
594 (use less memory, CPU)
598 =head2 constant function cache
600 =head2 foreach(reverse...)
602 =head2 Cache eval tree
604 Unless lexical outer scope used (mark in &compiling?).
608 =head2 Shrink opcode tables
610 Via multiple implementations selected in peep.
612 =head2 Cache hash value
614 Not a win, according to Guido.
616 =head2 Optimize away @_ where possible
618 =head2 Rewrite regexp parser for better integrated optimization
620 The regexp parser was rewritten for 5.005. Ilya's the regexp guru.
622 =head1 Vague possibilities
626 =item ref function in list context
628 This seems impossible to do without substantially breaking code.
630 =item make tr/// return histogram in list context?
632 =item Loop control on do{} et al
634 =item compile to real threaded code
636 =item structured types
638 =item Modifiable $1 et al
640 The intent is for this to be a means of editing the matched portions of
645 =head1 To Do Or Not To Do
647 These are things that have been discussed in the past and roundly
648 criticized for being of questionable value.
650 =head2 Making my() work on "package" variables
652 Being able to say my($Foo::Bar), something that sounds ludicrous and
653 the 5.6 pumpking has mocked.
655 =head2 "or" testing defined not truth
657 We tell people that C<||> can be used to give a default value to a
660 $children = shift || 5; # default is 5 children
662 which is almost (but not):
665 $children = 5 unless $children;
667 but if the first argument was given and is "0", then it will be
668 considered false by C<||> and C<5> used instead. Really we want
669 an C<||>-like operator that behaves like:
672 $children = 5 unless defined $children;
674 Namely, a C<||> that tests defined-ness rather than truth. One was
675 discussed, and a patch submitted, but the objections were many. While
676 there were objections, many still feel the need. At least it was
677 decided that C<??> is the best name for the operator.
679 =head2 "dynamic" lexicals
686 Localizing, as Tim Bunce points out, is a separate concept from
687 whether the variable is global or lexical. Chip Salzenberg had
688 an implementation once, but Larry thought it had potential to
691 =head2 "class"-based, rather than package-based "lexicals"
693 This is like what the Alias module provides, but the variables would
694 be lexicals reserved by perl at compile-time, which really are indices
695 pointing into the pseudo-hash object visible inside every method so
702 Which of the standard modules are thread-safe? Which CPAN modules?
703 How easy is it to fix those non-safe modules?
707 Threading is still experimental. Every reproducible bug identifies
708 something else for us to fix. Find and submit more of these problems.
714 Consistent semantics for exit/die in threads.
716 =head2 External threads
718 Better support for externally created threads.
724 Spot-check globals like statcache and global GVs for thread-safety.
725 "B<Part done>", says Sarathy.
727 =head2 Per-thread GVs
729 According to Sarathy, this would make @_ be the same in threaded
730 and non-threaded, as well as helping solve problems like filehandles
731 (the same filehandle currently cannot be used in two threads).
737 The compiler's back-end code-generators for creating bytecode or
738 compilable C code could use optimization work.
742 Figure out how and where byteperl will be built for the various
745 =head2 Precompiled modules
747 Save byte-compiled modules on disk.
751 Auto-produce executable.
753 =head2 Typed lexicals
755 Typed lexicals should affect B::CC::load_pad.
759 Workarounds to help Win32 dynamic loading.
763 END blocks need saving in compiled output, now that CHECK blocks
772 Fix comppadlist (names in comppad_name can have fake SvCUR
773 from where newASSIGNOP steals the field).
775 =head2 Cached compilation
777 Can we install modules as bytecode?
781 Ongoing effort: keep filenames in the distribution and in the standard
782 module set be 8.3 friendly where feasible. Good luck changing the
783 standard modules, though.
787 Perl should be more generous in accepting foreign line terminations.
788 Mostly B<done> in 5.005.
790 =head2 Namespace cleanup
792 symbol-space: "pl_" prefix for all global vars
793 "Perl_" prefix for all functions
795 CPP-space: stop malloc()/free() pollution unless asked
799 Rename and alter ISA.pm. B<Done>. It is now base.pm.
803 This is the Fatal.pm module, so any builtin that does
804 not return success automatically die()s. If you're feeling brave, tie
805 this in with the unified exceptions scheme.