3 This is a list of wishes for Perl. It is maintained by Nathan
4 Torkington for the Perl porters. Send updates to
5 I<perl5-porters@perl.org>. If you want to work on any of these
6 projects, be sure to check the perl5-porters archives for past ideas,
7 flames, and propaganda. This will save you time and also prevent you
8 from implementing something that Larry has already vetoed. One set
9 of archives may be found at:
11 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
16 =head2 Mailing list archives
18 Chaim suggests contacting egroup and asking them to archive the other
19 perl.org mailing lists. Probably not advocacy, but definitely
22 =head2 Bug tracking system
24 Richard Foley I<richard@perl.org> is writing one. We looked at
25 several, like gnats and the Debian system, but at the time we
26 investigated them, none met our needs. Since then, Jitterbug has
27 matured, and may be worth reinvestigation.
29 The system we've developed will eventually be recipient of perlbug
30 mail. New bugs are entered into a mysql database, and sent on to
31 perl5-porters with the subject line rewritten to include a "ticket
32 number" (unique ID for the new bug). If the incoming message already
33 had a ticket number in the subject line, then the message is logged
34 against that bug. There is a separate email interface (not forwarding
35 to p5p) that permits porters to claim, categorize, and close tickets.
37 The next desire is a web interface. It is hoped that code can be
38 reused between the mail and the web interfaces.
40 The current delay in implementation is caused by perl.org lockups.
41 One suspect is the mail handling system, possibly going into loops.
43 We're probably going to need a bugmaster, someone who will look at
44 every new "bug" and kill those that we already know about, those
45 that are not bugs at all, etc.
47 =head2 Regression Tests
49 The test suite for Perl serves two needs: ensuring features work, and
50 ensuring old bugs have not been reintroduced. Both need work.
52 Brent LaVelle (lavelle@metronet.com) has stepped forward to work on
53 performance tests and improving the size of the test suite.
59 Do the tests that come with Perl exercise every line (or every block,
60 or ...) of the Perl interpreter, and if not then how can we make them
65 No bug fixes should be made without a corresponding testsuite addition.
66 This needs a dedicated enforcer, as the current pumpking is either too
67 lazy or too stupid or both and lets enforcement wander all over the
72 Tests that fail need to be of a form that can be readily mailed
73 to perlbug and diagnosed with minimal back-and-forth's to determine
74 which test failed, due to what cause, etc.
78 We need regression/sanity tests for suidperl
80 =item The 25% slowdown from perl4 to perl5
82 This value may or may not be accurate, but it certainly is
83 eye-catching. For some things perl5 is faster than perl4, but often
84 the reliability and extensability have come at a cost of speed. The
85 benchmark suite that Gisle released earlier has been hailed as both a
86 fantastic solution and as a source of entirely meaningless figures.
87 Do we need to test "real applications"? Can you do so? Anyone have
88 machines to dedicate to the task? Identify the things that have grown
89 slower, and see if there's a way to make them faster.
95 Make filenames in the distribution and in the standard module set
96 be 8.3 friendly where feasible. Good luck changing the standard
97 modules, though. B<Done>.
101 Andy Dougherty maintain(ed|s) a list of "todo" items for the configure
102 that comes with Perl. See Porting/pumpkin.pod in the latest
107 Have "make install" give you the option to install HTML as well. This
108 would be part of Configure. Andy Wardley (certified Perl studmuffin)
109 will look into the current problems of HTML installation--is
110 'installhtml' preventing this from happening cleanly, or is pod2html
111 the problem? If the latter, Brad Appleton's pod work may fix the
118 Declare global variables (lexically or otherwise).
122 Verify complete 64 bit support so that the value of sysseek, or C<-s>, or
123 stat(), or tell can fit into a perl number without losing precision.
124 Work with the perl-64bit mailing list on perl.org.
126 =head2 Figure a way out of $^(capital letter)
128 Figure out a clean way to extend $^(capital letter) beyond
129 the 26 alphabets. (${^WORD} maybe?)
135 =item Named prototypes
137 Add proper named prototypes that actually work usefully.
139 =item Indirect objects
141 Fix prototype bug that forgets indirect objects.
145 Prototypes for method calls.
149 Return context prototype declarations.
153 lexically-scoped subs, e.g. my sub
157 =head2 Built-in globbing
159 Currently the C<E<lt>*.cE<gt>> syntax calls the c shell. This causes
160 problems on sites without csh, systems where fork() is expensive, and
161 setuid environments. Decide between Glob::BSD and File::KGlob, move
162 it into the core, and make Perl use it for globbing. Ben Holzman and
163 Tye McQueen have claimed the pumpkin for this.
165 =head2 Proper tied array support
167 This was B<done> in 5.005 by Nick Ing-Simmons.
169 =head1 Perl Internals
173 C<magic_setisa> should be made to update %FIELDS [???]
177 Perl should be more generous in accepting foreign line terminations.
178 Mostly B<done> in 5.005.
180 =head2 Garbage Collection
182 There was talk of a mark-and-sweep garbage collector at TPC2, but the
183 (to users) unpredictable nature of its behaviour put some off.
184 Sarathy, I believe, did the work. Here's what he has to say:
186 Yeah, I hope to implement it someday too. The points that were
187 raised in TPC2 were all to do with calling DESTROY() methods, but
188 I think we can accomodate that by extending bless() to stash
189 extra information for objects so we track their lifetime accurately
190 for those that want their DESTROY() to be predictable (this will be
191 a speed hit, naturally, and will therefore be optional, naturally. :)
193 [N.B. Don't even ask me about this now! When I have the time to
194 write a cogent summary, I'll post it.]
196 =head2 Reliable signals
198 Sarathy and Dan Sugalski are working on this. Chip posted a patch
199 earlier, but it was not accepted into 5.005. The issue is tricky,
200 because it has the potential to greatly slow down the core.
202 There are at least three things to consider:
206 =item Alternate runops() for signal despatch
208 Sarathy and Dan are discussed this on perl5-porters.
210 =item Figure out how to die() in delayed sighandler
212 =item Add tests for Thread::Signal
214 =item Automatic tests against CPAN
216 Is there some way to automatically build all/most of CPAN with
217 the new Perl and check that the modules there pass all the tests?
221 =head2 Interpolated regex performance bugs
225 foreach $pat (@patterns) {
231 The qr// syntax added in 5.005 has solved this problem, but
232 it needs more thorough documentation.
234 =head2 Memory leaks from failed eval/regcomp
236 The only known memory leaks in Perl are in failed code or regexp
237 compilation. Fix this. Hugo Van Der Sanden will attempt this but
238 won't have tuits until January 1999.
240 =head2 Make XS easier to use
242 There was interest in SWIG from porters, but nothing has happened
245 =head2 Make embedded Perl easier to use
247 This is probably difficult for the same reasons that "XS For Dummies"
250 =head2 Namespace cleanup
252 symbol-space: "pl_" prefix for all global vars
253 "Perl_" prefix for all functions
257 CPP-space: restrict what we export from headers
258 stop malloc()/free() pollution unless asked
259 header-space: move into CORE/perl/
260 API-space: begin list of things that constitute public api
264 Complete work on safe recursive interpreters C<Perl-E<gt>new()>.
265 Sarathy says that a reference implementation exists.
269 Chris Nandor and Matthias Neeracher are working on better integrating
270 MacPerl into the Perl distribution.
274 There's a lot of documentation that comes with Perl. The quantity of
275 documentation makes it difficult for users to know which section of
276 which manpage to read in order to solve their problem. Tom
277 Christiansen has done much of the documentation work in the past.
279 =head2 A clear division into tutorial and reference
281 Some manpages (e.g., perltoot and perlreftut) clearly set out to
282 educate the reader about a subject. Other manpages (e.g., perlsub)
283 are references for which there is no tutorial, or are references with
284 a slight tutorial bent. If things are either tutorial or reference,
285 then the reader knows which manpage to read to learn about a subject,
286 and which manpage to read to learn all about an aspect of that
287 subject. Part of the solution to this is:
289 =head2 Remove the artificial distinction between operators and functions
291 History shows us that users, and often porters, aren't clear on the
292 operator-function distinction. The present split in reference
293 material between perlfunc and perlop hinders user navigation. Given
294 that perlfunc is by far the larger of the two, move operator reference
297 =head2 More tutorials
299 More documents of a tutorial nature could help. Here are some
304 =item Regular expressions
306 Robin Berjon (r.berjon@ltconsulting.net) has volunteered.
310 Mark-Jason Dominus (mjd@plover.com) has an outline for perliotut.
314 This is badly needed. There has been some discussion on the
315 subject on perl5-porters.
319 Ronald Kimball (rjk@linguist.dartmouth.edu) has volunteered.
321 =head2 Include a search tool
323 perldoc should be able to 'grep' fulltext indices of installed POD
324 files. This would let people say:
326 perldoc -find printing numbers with commas
328 and get back the perlfaq entry on 'commify'.
330 This solution, however, requires documentation to contain the keywords
331 the user is searching for. Even when the users know what they're
332 looking for, often they can't spell it.
334 =head2 Include a locate tool
336 perldoc should be able to help people find the manpages on a
337 particular high-level subject:
341 would tell them manpages, web pages, and books with material on web
342 programming. Similarly C<perldoc -find databases>, C<perldoc -find
343 references> and so on.
345 We need something in the vicinity of:
347 % perl -help random stuff
348 No documentation for perl function `random stuff' found
349 The following entry in perlfunc.pod matches /random/a:
354 Returns a random fractional number greater than or equal to C<0> and less
355 than the value of EXPR. (EXPR should be positive.) If EXPR is
356 omitted, the value C<1> is used. Automatically calls C<srand()> unless
357 C<srand()> has already been called. See also C<srand()>.
359 (Note: If your rand function consistently returns numbers that are too
360 large or too small, then your version of Perl was probably compiled
361 with the wrong number of RANDBITS.)
362 The following pod pages seem to have /stuff/a:
363 perlfunc.pod (7 hits)
364 perlfaq7.pod (6 hits)
367 perlfaq8.pod (2 hits)
369 perl5004delta.pod (1 hit)
370 perl5005delta.pod (1 hit)
372 perldelta.pod (1 hit)
379 Proceed to open perlfunc.pod? [y] n
380 Do you want to speak perl interactively? [y] n
381 Should I dial 911? [y] n
382 Do you need psychiatric help? [y] y
383 <PELIZA> Hi, what bothers you today?
384 A Python programmer in the next cubby is driving me nuts!
385 <PELIZA> Hmm, thats fixable. Just [rest censored]
387 =head2 Separate function manpages by default
389 Perl should install 'manpages' for every function/operator into the
390 3pl or 3p manual section. By default. The splitman program in the
391 Perl source distribution does the work of turning big perlfunc into
394 =head2 Users can't find the manpages
396 Make C<perldoc> tell users what they need to add to their .login or
397 .cshrc to set their MANPATH correctly.
399 =head2 Install ALL Documentation
401 Make the standard documentation kit include the VMS, OS/2, Win32,
402 Threads, etc information.
404 =head2 Outstanding issues to be documented
406 Tom has a list of 5.005_5* features or changes that require
409 Create one document that coherently explains the delta between the
410 last camel release and the current release. perldelta was supposed
411 to be that, but no longer. The things in perldelta never seemed to
412 get placed in the right places in the real manpages, either. This
415 =head2 Replace man with a perl program
417 Can we reimplement man in Perl? Tom has a start. I believe some of
418 the Linux systems distribute a manalike. Alternatively, build on
419 perldoc to remove the unfeatures like "is slow" and "has no apropos".
421 =head2 Unicode tutorial
423 We could use more work on helping people understand Perl's new
424 Unicode support that Larry has created.
428 Given a piece of Perl code, say what it does. B::Deparse is doing
433 =head2 Update the POSIX extension to conform with the POSIX 1003.1 Edition 2
435 The current state of the POSIX extension is as of Edition 1, 1991,
436 whereas the Edition 2 came out in 1996. ISO/IEC 9945:1-1996(E),
437 ANSI/IEEE Std 1003.1, 1996 Edition. ISBN 1-55937-573-6. The updates
438 were legion: threads, IPC, and real time extensions.
440 =head2 Module versions
442 Automate the checking of versions in the standard distribution so
443 it's easy for a pumpking to check whether CPAN has a newer version
444 that we should be including?
448 Which modules should be added to the standard distribution? This ties
449 in with the SDK discussed on the perl-sdk list at perl.org.
453 Rename and alter ISA.pm. B<Done>. It is now base.pm.
457 Make the profiler (Devel::DProf) part of the standard release, and
466 Implement array using vec(). Nathan Torkington has working code to
471 Implement array using substr()
475 Implement array using a file
479 Defines shift et al in terms of splice method
485 Figure out a coherent exception model, and implement it. Graham's
486 Error.pm is an OO module that (I believe) requires core support.
487 Are objects the right basis for this? Can it be done using the same
488 text that the rest of Perl works on? The builtins will need to agree
491 =head2 Procedural options
493 Support procedural interfaces for the common cases of Perl's
494 gratuitously OOO modules. Tom objects to "use IO::File" reading many
495 thousands of lines of code.
499 Write a module for transparent, portable remote procedure calls. (Not
500 core). This touches on the CORBA and ILU work.
502 =head2 y2k localtime/gmtime
504 Write a module, Y2k::Catch, which overloads localtime and gmtime's
505 returned year value and catches "bad" attempts to use it.
507 =head2 Export File::Find variables
509 Make File::Find export C<$name> etc manually, at least if asked to.
513 Finish a proper Ioctl module.
515 =head2 Debugger attach/detach
517 Permit a user to debug an already-running program.
519 =head2 Regular Expression debugger
521 Create a visual profiler/debugger tool that stepped you through the
522 execution of a regular expression point by point. Ilya has a module
523 to color-code and display regular expression parses and executions.
524 There's something at http://tkworld.org/ that might be a good start,
525 it's a Tk/Tcl RE wizard, that builds regexen of many flavours.
527 =head2 Alternative RE Syntax
529 Make an alternative regular expression syntax that is accessed through
530 a module. For instance,
533 $re = start_of_line()
534 ->literal("1998/10/08")
535 ->optional( whitespace() )
537 ->remember( many( or( "-", digit() ) ) );
540 print "time is $1\n";
543 Newbies to regular expressions typically only use a subset of the full
544 language. Perhaps you wouldn't have to implement the full feature set.
546 =head2 Bundled modules
548 Nicholas Clark (nick@flirble.org) had a patch for storing modules in
549 zipped format. This needs exploring and concluding.
553 Adopt IO::Tty, make it as portable as Don Libes' "expect" (can we link
554 against expect code?), and perfect a Perl version of expect. IO::Tty
555 and expect could then be distributed as part of the core distribution,
556 replacing Comm.pl and other hacks.
560 A simple-to-use interface to native graphical abilities would
561 be welcomed. Oh, Perl's access Tk is nice enough, and reasonably
562 portable, but it's not particularly as fast as one would like.
563 Simple access to the mouse's cut buffer or mouse-presses shouldn't
564 required loading a few terabytes of Tk code.
566 =head2 Update semibroken auxiliary tools; h2ph, a2p, etc.
568 Kurt Starsinic is working on h2ph. mjd has fixed bugs in a2p in the
569 past. a2p apparently doesn't work on nawk and gawk extensions.
570 Graham Barr has an Include module that does h2ph work at runtime.
572 =head2 POD Converters
574 Brad's PodParser code needs to become part of the core, and the Pod::*
575 and pod2* programs rewritten to use this standard parser. Currently
576 the converters take different options, some behave in different
577 fashions, and some are more picky than others in terms of the POD
582 A short-term fix: pod2html generates absolute HTML links. Make it
583 generate relative links.
587 Something like lint for Pod would be good. Something that catches
588 common errors as well as gross ones. Brad Appleton is putting
589 together something as part of his PodParser work.
595 Design a webperl environment that's as tightly integrated and as
596 easy-to-use as Perl's current command-line environment.
600 More work on a safe and secure execution environment for mobile
601 agents would be neat; the Safe.pm module is a start, but there's a
602 still a lot to be done in that area. Adopt Penguin?
604 =head2 POSIX on non-POSIX
606 Standard programming constructs for non-POSIX systems would help a
607 lot of programmers stuck on primitive, legacy systems. For example,
608 Microsoft still hasn't made a usable POSIX interface on their clunky
609 systems, which means that standard operations such as alarm() and
610 fork(), both critical for sophisticated client-server programming,
611 must both be kludged around.
613 I'm unsure whether Tom means to emulate alarm( )and fork(), or merely
614 to provide a document like perlport.pod to say which features are
615 portable and which are not.
617 =head2 Portable installations
619 Figure out a portable semi-gelled installation, that is, one without
620 full paths. Larry has said that he's thinking about this. Ilya
621 pointed out that perllib_mangle() is good for this.
625 =head2 Automate maintenance of most PERL_OBJECT code
627 B<Done>, says Sarathy.
629 =head2 Get PERL_OBJECT building under gcc
631 B<Part done>, according to Sarathy. It builds under egcs on win32,
632 but doesn't run for occult reasons. If anyone knows the right
633 breed of chicken to sacrifice, please speak up.
635 =head2 Rename new headers to be consistent with the rest
637 =head2 Sort out the spawnvp() mess
639 =head2 Work out DLL versioning
641 =head2 Get PERL_OBJECT building on non-win32
645 =head1 Would be nice to have
649 =item C<pack "(stuff)*">
651 =item Contiguous bitfields in pack/unpack
655 =item Bundled perl preprocessor
657 =item Use posix calls internally where possible
661 Joshua Pritikin sent patches to p5p in early December 1998.
667 Added in 5.004_70. B<Done>
669 =item -i rename file only when successfully changed
671 =item All ARGV input should act like <>
673 =item report HANDLE [formats].
675 =item support in perlmain to rerun debugger
677 =item reference to compiled regexp
679 B<done> This is the qr// support in 5.005.
681 =item lvalue functions
683 Tuomas Lukka, on behalf of the PDL project, greatly desires this and
684 Ilya has a patch for it (probably against an older version of Perl).
685 Tuomas points out that what PDL really wants is lvalue I<methods>,
690 =head1 Possible pragmas
694 (use less memory, CPU)
698 =head2 constant function cache
700 =head2 eval qw() at compile time
702 qw() is presently compiled as a call to split. This means the split
703 happens at runtime. Change this so qw() is compiled as a real list
704 assignment. This also avoids surprises like:
706 $a = () = qw(What will $a hold?);
708 B<Done>. Tom Hughes submitted a patch that went into 5.005_55.
710 =head2 foreach(reverse...)
712 =head2 Cache eval tree
714 Unless lexical outer scope used (mark in &compiling?).
718 =head2 Shrink opcode tables
720 Via multiple implementations selected in peep.
722 =head2 Cache hash value
724 Not a win, according to Guido.
726 =head2 Optimize away @_ where possible
728 =head2 Optimize sort by { $a <=> $b }
730 Greg Bacon added several more sort optimizations. These have
731 made it into 5.005_55, thanks to Hans Mulder.
733 =head2 Rewrite regexp parser for better integrated optimization
735 The regexp parser was rewritten for 5.005. Ilya's the regexp guru.
737 =head1 Vague possibilities
741 =item ref function in list context
743 This seems impossible to do without substantially breaking code.
745 =item make tr/// return histogram in list context?
747 =item Loop control on do{} et al
749 =item Explicit switch statements
751 Nobody has yet managed to come up with a switch syntax that would
752 allow for mixed hash, constant, regexp checks. Submit implementation
755 =item compile to real threaded code
757 =item structured types
761 B<Done>. This is the Fatal.pm module, so any builtin that that does
762 not return success automatically die()s. If you're feeling brave, tie
763 this in with the unified exceptions scheme.
765 =item Modifiable $1 et al
767 The intent is for this to be a means of editing the matched portions of
772 =head1 To Do Or Not To Do
774 These are things that have been discussed in the past and roundly
775 criticized for being of questionable value.
777 =head2 Making my() work on "package" variables
779 Being able to say my($Foo::Bar), something that sounds ludicrous and
780 the 5.006 pumpking has mocked.
782 =head2 "or" testing defined not truth
784 We tell people that C<||> can be used to give a default value to a
787 $children = shift || 5; # default is 5 children
789 which is almost (but not):
792 $children = 5 unless $children;
794 but if the first argument was given and is "0", then it will be
795 considered false by C<||> and C<5> used instead. Really we want
796 an C<||>-like construct that behaves like:
799 $children = 5 unless defined $children;
801 Namely, a C<||> that tests defined-ness rather than truth. One
802 was discussed, and a patch submitted, but the objections were many:
808 We're running out of punctuation. C<|||>, the suggested operator, is
813 To work like the other logical operators, there'd need to be C<|||=>
814 and "English" equivalents (as there is "or" for "||"). We couldn't
815 settle on an equivalent we liked. Does there also have to be an "&&"
820 While there were objections, many still feel the need.
822 =head2 "dynamic" lexicals
829 Localizing, as Tim Bunce points out, is a separate concept from
830 whether the variable is global or lexical. Chip Salzenberg had
831 an implementation once, but Larry thought it had potential to
834 =head2 "class"-based, rather than package-based "lexicals"
836 This is like what the Alias module provides, but the variables would
837 be lexicals reserved by perl at compile-time, which really are indices
838 pointing into the pseudo-hash object visible inside every method so
845 Which of the standard modules are thread-safe? Which CPAN modules?
846 How easy is it to fix those non-safe modules?
850 Threading is still experimental. Every reproducible bug identifies
851 something else for us to fix. Find and submit more of these problems.
857 Consistent semantics for exit/die in threads.
859 =head2 External threads
861 Better support for externally created threads.
867 Spot-check globals like statcache and global GVs for thread-safety.
868 "B<Part done>", says Sarathy.
870 =head2 Per-thread GVs
872 According to Sarathy, this would make @_ be the same in threaded
873 and non-threaded, as well as helping solve problems like filehandles
874 (the same filehandle currently cannot be used in two threads).
880 The compiler's back-end code-generators for creating bytecode or
881 compilable C code could use optimization work.
885 Figure out how and where byteperl will be built for the various
888 =head2 Precompiled modules
890 Save byte-compiled modules on disk.
894 Auto-produce executable.
896 =head2 Typed lexicals
898 Typed lexicals should affect B::CC::load_pad.
902 Workarounds to help Win32 dynamic loading.
904 =head2 Status variable
906 $^C to track compiler/checker status. B<Done> in 5.005_54.
910 END blocks need saving in compiled output.
918 Fix comppadlist (names in comppad_name can have fake SvCUR
919 from where newASSIGNOP steals the field).
921 =head2 Cached compilation
923 Can we install modules as bytecode?