Re: Perl book, magazine and website updates.
[p5sagit/p5-mst-13.2.git] / pod / perltodo.pod
CommitLineData
7711098a 1=head1 NAME
2
3perltodo - Perl TO-DO List
4
5=head1 DESCRIPTION
e50bb9a1 6
7This is a list of wishes for Perl. It is maintained by Nathan
8Torkington for the Perl porters. Send updates to
9I<perl5-porters@perl.org>. If you want to work on any of these
10projects, be sure to check the perl5-porters archives for past ideas,
11flames, and propaganda. This will save you time and also prevent you
12from implementing something that Larry has already vetoed. One set
13of archives may be found at:
14
15 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
16
17
18=head1 Infrastructure
19
20=head2 Mailing list archives
21
22Chaim suggests contacting egroup and asking them to archive the other
23perl.org mailing lists. Probably not advocacy, but definitely
24perl6-porters, etc.
25
26=head2 Bug tracking system
27
28Richard Foley I<richard@perl.org> is writing one. We looked at
29several, like gnats and the Debian system, but at the time we
30investigated them, none met our needs. Since then, Jitterbug has
31matured, and may be worth reinvestigation.
32
e28598cb 33The system we've developed is the recipient of perlbug mail, and any
34followups it generates from perl5-porters. New bugs are entered
35into a mysql database, and sent on to
e50bb9a1 36perl5-porters with the subject line rewritten to include a "ticket
37number" (unique ID for the new bug). If the incoming message already
38had a ticket number in the subject line, then the message is logged
39against that bug. There is a separate email interface (not forwarding
40to p5p) that permits porters to claim, categorize, and close tickets.
41
e28598cb 42There is also a web interface to the system at http://bugs.perl.org.
e50bb9a1 43
44The current delay in implementation is caused by perl.org lockups.
45One suspect is the mail handling system, possibly going into loops.
46
e28598cb 47We still desperately need a bugmaster, someone who will look at
e50bb9a1 48every new "bug" and kill those that we already know about, those
49that are not bugs at all, etc.
50
51=head2 Regression Tests
52
53The test suite for Perl serves two needs: ensuring features work, and
54ensuring old bugs have not been reintroduced. Both need work.
55
56Brent LaVelle (lavelle@metronet.com) has stepped forward to work on
57performance tests and improving the size of the test suite.
58
59=over 4
60
61=item Coverage
62
63Do the tests that come with Perl exercise every line (or every block,
64or ...) of the Perl interpreter, and if not then how can we make them
65do so?
66
67=item Regression
68
69No bug fixes should be made without a corresponding testsuite addition.
70This needs a dedicated enforcer, as the current pumpking is either too
71lazy or too stupid or both and lets enforcement wander all over the
72map. :-)
73
74=item __DIE__
75
76Tests that fail need to be of a form that can be readily mailed
77to perlbug and diagnosed with minimal back-and-forth's to determine
78which test failed, due to what cause, etc.
79
80=item suidperl
81
82We need regression/sanity tests for suidperl
83
84=item The 25% slowdown from perl4 to perl5
85
86This value may or may not be accurate, but it certainly is
87eye-catching. For some things perl5 is faster than perl4, but often
a2293a43 88the reliability and extensibility have come at a cost of speed. The
e50bb9a1 89benchmark suite that Gisle released earlier has been hailed as both a
90fantastic solution and as a source of entirely meaningless figures.
91Do we need to test "real applications"? Can you do so? Anyone have
92machines to dedicate to the task? Identify the things that have grown
93slower, and see if there's a way to make them faster.
94
95=back
96
e50bb9a1 97=head1 Configure
98
99Andy Dougherty maintain(ed|s) a list of "todo" items for the configure
100that comes with Perl. See Porting/pumpkin.pod in the latest
101source release.
102
103=head2 Install HTML
104
105Have "make install" give you the option to install HTML as well. This
106would be part of Configure. Andy Wardley (certified Perl studmuffin)
107will look into the current problems of HTML installation--is
108'installhtml' preventing this from happening cleanly, or is pod2html
109the problem? If the latter, Brad Appleton's pod work may fix the
110problem for free.
111
112=head1 Perl Language
113
e50bb9a1 114=head2 Prototypes
115
116=over 4
117
118=item Named prototypes
119
120Add proper named prototypes that actually work usefully.
121
122=item Indirect objects
123
124Fix prototype bug that forgets indirect objects.
125
126=item Method calls
127
128Prototypes for method calls.
129
130=item Context
131
132Return context prototype declarations.
133
134=item Scoped subs
135
136lexically-scoped subs, e.g. my sub
137
138=back
139
e50bb9a1 140=head1 Perl Internals
141
142=head2 magic_setisa
143
144C<magic_setisa> should be made to update %FIELDS [???]
145
e50bb9a1 146=head2 Garbage Collection
147
148There was talk of a mark-and-sweep garbage collector at TPC2, but the
149(to users) unpredictable nature of its behaviour put some off.
150Sarathy, I believe, did the work. Here's what he has to say:
151
152Yeah, I hope to implement it someday too. The points that were
153raised in TPC2 were all to do with calling DESTROY() methods, but
a2293a43 154I think we can accommodate that by extending bless() to stash
e50bb9a1 155extra information for objects so we track their lifetime accurately
156for those that want their DESTROY() to be predictable (this will be
157a speed hit, naturally, and will therefore be optional, naturally. :)
c47ff5f1 158
e50bb9a1 159[N.B. Don't even ask me about this now! When I have the time to
160write a cogent summary, I'll post it.]
161
162=head2 Reliable signals
163
83df6a1d 164Mostly done in Perl 5.8, there is now a reliable signal handler
165despatch. No measurable slowdown detected in Linux or Solaris
166with the 5.8 approach (implemented by Nick I-S).
e50bb9a1 167
168There are at least three things to consider:
169
170=over 4
171
172=item Alternate runops() for signal despatch
173
83df6a1d 174Sarathy and Dan discussed this on perl5-porters.
e50bb9a1 175
176=item Figure out how to die() in delayed sighandler
177
178=item Add tests for Thread::Signal
179
180=item Automatic tests against CPAN
181
182Is there some way to automatically build all/most of CPAN with
183the new Perl and check that the modules there pass all the tests?
184
185=back
186
187=head2 Interpolated regex performance bugs
188
189 while (<>) {
190 $found = 0;
191 foreach $pat (@patterns) {
192 $found++ if /$pat/o;
193 }
194 print if $found;
195 }
196
197The qr// syntax added in 5.005 has solved this problem, but
198it needs more thorough documentation.
199
200=head2 Memory leaks from failed eval/regcomp
201
202The only known memory leaks in Perl are in failed code or regexp
83df6a1d 203compilation. Fix this.
204
205Noticed in Perl 5.6: Also local()ising tied variables leak.
e50bb9a1 206
207=head2 Make XS easier to use
208
209There was interest in SWIG from porters, but nothing has happened
210lately.
211
83df6a1d 212New development in 2001: the Inline module, when it gels, shows great
213promise.
214
e50bb9a1 215=head2 Make embedded Perl easier to use
216
217This is probably difficult for the same reasons that "XS For Dummies"
218will be difficult.
219
220=head2 Namespace cleanup
221
04c70446 222 CPP-space: restrict CPP symbols exported from headers
e50bb9a1 223 header-space: move into CORE/perl/
224 API-space: begin list of things that constitute public api
766b5730 225 env-space: Configure should use PERL_CONFIG instead of CONFIG etc.
e50bb9a1 226
227=head2 MULTIPLICITY
228
229Complete work on safe recursive interpreters C<Perl-E<gt>new()>.
230Sarathy says that a reference implementation exists.
231
232=head2 MacPerl
233
234Chris Nandor and Matthias Neeracher are working on better integrating
235MacPerl into the Perl distribution.
236
237=head1 Documentation
238
239There's a lot of documentation that comes with Perl. The quantity of
240documentation makes it difficult for users to know which section of
241which manpage to read in order to solve their problem. Tom
242Christiansen has done much of the documentation work in the past.
243
244=head2 A clear division into tutorial and reference
245
246Some manpages (e.g., perltoot and perlreftut) clearly set out to
247educate the reader about a subject. Other manpages (e.g., perlsub)
248are references for which there is no tutorial, or are references with
249a slight tutorial bent. If things are either tutorial or reference,
250then the reader knows which manpage to read to learn about a subject,
251and which manpage to read to learn all about an aspect of that
252subject. Part of the solution to this is:
253
254=head2 Remove the artificial distinction between operators and functions
255
256History shows us that users, and often porters, aren't clear on the
257operator-function distinction. The present split in reference
258material between perlfunc and perlop hinders user navigation. Given
259that perlfunc is by far the larger of the two, move operator reference
260into perlfunc.
261
262=head2 More tutorials
263
264More documents of a tutorial nature could help. Here are some
265candidates:
266
267=over 4
268
e50bb9a1 269=item I/O
270
271Mark-Jason Dominus (mjd@plover.com) has an outline for perliotut.
272
273=item pack/unpack
274
275This is badly needed. There has been some discussion on the
276subject on perl5-porters.
277
278=item Debugging
279
280Ronald Kimball (rjk@linguist.dartmouth.edu) has volunteered.
281
a45bd81d 282=back
283
e50bb9a1 284=head2 Include a search tool
285
286perldoc should be able to 'grep' fulltext indices of installed POD
287files. This would let people say:
288
289 perldoc -find printing numbers with commas
290
291and get back the perlfaq entry on 'commify'.
292
293This solution, however, requires documentation to contain the keywords
294the user is searching for. Even when the users know what they're
295looking for, often they can't spell it.
296
297=head2 Include a locate tool
298
299perldoc should be able to help people find the manpages on a
300particular high-level subject:
301
302 perldoc -find web
303
304would tell them manpages, web pages, and books with material on web
305programming. Similarly C<perldoc -find databases>, C<perldoc -find
306references> and so on.
307
308We need something in the vicinity of:
309
310 % perl -help random stuff
311 No documentation for perl function `random stuff' found
312 The following entry in perlfunc.pod matches /random/a:
313 =item rand EXPR
c47ff5f1 314
e50bb9a1 315 =item rand
c47ff5f1 316
e50bb9a1 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()>.
c47ff5f1 321
e50bb9a1 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)
328 perlmod.pod (4 hits)
329 perlsyn.pod (3 hits)
330 perlfaq8.pod (2 hits)
331 perlipc.pod (2 hits)
332 perl5004delta.pod (1 hit)
333 perl5005delta.pod (1 hit)
334 perlcall.pod (1 hit)
335 perldelta.pod (1 hit)
336 perlfaq3.pod (1 hit)
337 perlfaq5.pod (1 hit)
338 perlhist.pod (1 hit)
339 perlref.pod (1 hit)
340 perltoc.pod (1 hit)
341 perltrap.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]
349
350=head2 Separate function manpages by default
351
352Perl should install 'manpages' for every function/operator into the
3533pl or 3p manual section. By default. The splitman program in the
354Perl source distribution does the work of turning big perlfunc into
355little 3p pages.
356
357=head2 Users can't find the manpages
358
359Make C<perldoc> tell users what they need to add to their .login or
360.cshrc to set their MANPATH correctly.
361
e50bb9a1 362=head2 Outstanding issues to be documented
363
364Tom has a list of 5.005_5* features or changes that require
365documentation.
366
367Create one document that coherently explains the delta between the
368last camel release and the current release. perldelta was supposed
369to be that, but no longer. The things in perldelta never seemed to
370get placed in the right places in the real manpages, either. This
371needs work.
372
04c70446 373=head2 Adapt www.linuxhq.com for Perl
374
375This should help glorify documentation and get more people involved in
376perl development.
377
e50bb9a1 378=head2 Replace man with a perl program
379
380Can we reimplement man in Perl? Tom has a start. I believe some of
381the Linux systems distribute a manalike. Alternatively, build on
382perldoc to remove the unfeatures like "is slow" and "has no apropos".
383
384=head2 Unicode tutorial
385
386We could use more work on helping people understand Perl's new
387Unicode support that Larry has created.
388
e50bb9a1 389=head1 Modules
390
391=head2 Update the POSIX extension to conform with the POSIX 1003.1 Edition 2
392
393The current state of the POSIX extension is as of Edition 1, 1991,
394whereas the Edition 2 came out in 1996. ISO/IEC 9945:1-1996(E),
395ANSI/IEEE Std 1003.1, 1996 Edition. ISBN 1-55937-573-6. The updates
396were legion: threads, IPC, and real time extensions.
397
398=head2 Module versions
399
400Automate the checking of versions in the standard distribution so
401it's easy for a pumpking to check whether CPAN has a newer version
402that we should be including?
403
404=head2 New modules
405
406Which modules should be added to the standard distribution? This ties
407in with the SDK discussed on the perl-sdk list at perl.org.
408
e50bb9a1 409=head2 Profiler
410
83df6a1d 411Devel::DProf requires more documentation.
e50bb9a1 412
413=head2 Tie Modules
414
415=over 4
416
417=item VecArray
418
419Implement array using vec(). Nathan Torkington has working code to
420do this.
421
422=item SubstrArray
423
424Implement array using substr()
425
426=item VirtualArray
427
428Implement array using a file
429
430=item ShiftSplice
431
432Defines shift et al in terms of splice method
433
434=back
435
e50bb9a1 436=head2 Procedural options
437
438Support procedural interfaces for the common cases of Perl's
439gratuitously OOO modules. Tom objects to "use IO::File" reading many
440thousands of lines of code.
441
442=head2 RPC
443
444Write a module for transparent, portable remote procedure calls. (Not
445core). This touches on the CORBA and ILU work.
446
e50bb9a1 447=head2 Export File::Find variables
448
449Make File::Find export C<$name> etc manually, at least if asked to.
450
451=head2 Ioctl
452
453Finish a proper Ioctl module.
454
455=head2 Debugger attach/detach
456
457Permit a user to debug an already-running program.
458
e50bb9a1 459=head2 Alternative RE Syntax
460
461Make an alternative regular expression syntax that is accessed through
462a module. For instance,
463
464 use RE;
465 $re = start_of_line()
466 ->literal("1998/10/08")
467 ->optional( whitespace() )
468 ->literal("[")
469 ->remember( many( or( "-", digit() ) ) );
470
471 if (/$re/) {
472 print "time is $1\n";
473 }
474
475Newbies to regular expressions typically only use a subset of the full
476language. Perhaps you wouldn't have to implement the full feature set.
477
478=head2 Bundled modules
479
480Nicholas Clark (nick@flirble.org) had a patch for storing modules in
481zipped format. This needs exploring and concluding.
482
483=head2 Expect
484
485Adopt IO::Tty, make it as portable as Don Libes' "expect" (can we link
486against expect code?), and perfect a Perl version of expect. IO::Tty
487and expect could then be distributed as part of the core distribution,
488replacing Comm.pl and other hacks.
489
490=head2 GUI::Native
491
492A simple-to-use interface to native graphical abilities would
493be welcomed. Oh, Perl's access Tk is nice enough, and reasonably
494portable, but it's not particularly as fast as one would like.
495Simple access to the mouse's cut buffer or mouse-presses shouldn't
496required loading a few terabytes of Tk code.
497
498=head2 Update semibroken auxiliary tools; h2ph, a2p, etc.
499
500Kurt Starsinic is working on h2ph. mjd has fixed bugs in a2p in the
501past. a2p apparently doesn't work on nawk and gawk extensions.
502Graham Barr has an Include module that does h2ph work at runtime.
503
e50bb9a1 504=head2 pod2html
505
506A short-term fix: pod2html generates absolute HTML links. Make it
507generate relative links.
508
509=head2 Podchecker
510
511Something like lint for Pod would be good. Something that catches
512common errors as well as gross ones. Brad Appleton is putting
513together something as part of his PodParser work.
514
515=head1 Tom's Wishes
516
517=head2 Webperl
518
519Design a webperl environment that's as tightly integrated and as
520easy-to-use as Perl's current command-line environment.
521
522=head2 Mobile agents
523
524More work on a safe and secure execution environment for mobile
525agents would be neat; the Safe.pm module is a start, but there's a
526still a lot to be done in that area. Adopt Penguin?
527
528=head2 POSIX on non-POSIX
529
530Standard programming constructs for non-POSIX systems would help a
531lot of programmers stuck on primitive, legacy systems. For example,
532Microsoft still hasn't made a usable POSIX interface on their clunky
533systems, which means that standard operations such as alarm() and
534fork(), both critical for sophisticated client-server programming,
535must both be kludged around.
536
537I'm unsure whether Tom means to emulate alarm( )and fork(), or merely
538to provide a document like perlport.pod to say which features are
539portable and which are not.
540
541=head2 Portable installations
542
543Figure out a portable semi-gelled installation, that is, one without
544full paths. Larry has said that he's thinking about this. Ilya
545pointed out that perllib_mangle() is good for this.
546
547=head1 Win32 Stuff
548
e50bb9a1 549=head2 Rename new headers to be consistent with the rest
550
551=head2 Sort out the spawnvp() mess
552
553=head2 Work out DLL versioning
554
e50bb9a1 555=head2 Style-check
556
557=head1 Would be nice to have
558
559=over 4
560
561=item C<pack "(stuff)*">
562
563=item Contiguous bitfields in pack/unpack
564
565=item lexperl
566
567=item Bundled perl preprocessor
568
569=item Use posix calls internally where possible
570
e50bb9a1 571=item format BOTTOM
572
e50bb9a1 573=item -i rename file only when successfully changed
574
575=item All ARGV input should act like <>
576
577=item report HANDLE [formats].
578
579=item support in perlmain to rerun debugger
580
e50bb9a1 581=item lvalue functions
582
583Tuomas Lukka, on behalf of the PDL project, greatly desires this and
584Ilya has a patch for it (probably against an older version of Perl).
585Tuomas points out that what PDL really wants is lvalue I<methods>,
586not just subs.
587
588=back
589
590=head1 Possible pragmas
591
592=head2 'less'
593
594(use less memory, CPU)
595
596=head1 Optimizations
597
598=head2 constant function cache
599
e50bb9a1 600=head2 foreach(reverse...)
601
602=head2 Cache eval tree
603
604Unless lexical outer scope used (mark in &compiling?).
605
606=head2 rcatmaybe
607
608=head2 Shrink opcode tables
609
610Via multiple implementations selected in peep.
611
612=head2 Cache hash value
613
614Not a win, according to Guido.
615
616=head2 Optimize away @_ where possible
617
e50bb9a1 618=head2 Rewrite regexp parser for better integrated optimization
619
620The regexp parser was rewritten for 5.005. Ilya's the regexp guru.
621
622=head1 Vague possibilities
623
624=over 4
625
626=item ref function in list context
627
628This seems impossible to do without substantially breaking code.
629
630=item make tr/// return histogram in list context?
631
632=item Loop control on do{} et al
633
e50bb9a1 634=item compile to real threaded code
635
636=item structured types
637
e50bb9a1 638=item Modifiable $1 et al
639
640The intent is for this to be a means of editing the matched portions of
641the target string.
642
643=back
644
645=head1 To Do Or Not To Do
646
647These are things that have been discussed in the past and roundly
648criticized for being of questionable value.
649
650=head2 Making my() work on "package" variables
651
652Being able to say my($Foo::Bar), something that sounds ludicrous and
87275199 653the 5.6 pumpking has mocked.
e50bb9a1 654
655=head2 "or" testing defined not truth
656
657We tell people that C<||> can be used to give a default value to a
658variable:
659
660 $children = shift || 5; # default is 5 children
661
662which is almost (but not):
663
664 $children = shift;
665 $children = 5 unless $children;
666
667but if the first argument was given and is "0", then it will be
668considered false by C<||> and C<5> used instead. Really we want
04c70446 669an C<||>-like operator that behaves like:
e50bb9a1 670
671 $children = shift;
672 $children = 5 unless defined $children;
673
04c70446 674Namely, a C<||> that tests defined-ness rather than truth. One was
675discussed, and a patch submitted, but the objections were many. While
676there were objections, many still feel the need. At least it was
677decided that C<??> is the best name for the operator.
e50bb9a1 678
679=head2 "dynamic" lexicals
680
681 my $x;
682 sub foo {
683 local $x;
684 }
685
686Localizing, as Tim Bunce points out, is a separate concept from
687whether the variable is global or lexical. Chip Salzenberg had
688an implementation once, but Larry thought it had potential to
689confuse.
690
691=head2 "class"-based, rather than package-based "lexicals"
692
693This is like what the Alias module provides, but the variables would
694be lexicals reserved by perl at compile-time, which really are indices
695pointing into the pseudo-hash object visible inside every method so
696declared.
697
698=head1 Threading
699
700=head2 Modules
701
702Which of the standard modules are thread-safe? Which CPAN modules?
703How easy is it to fix those non-safe modules?
704
705=head2 Testing
706
707Threading is still experimental. Every reproducible bug identifies
708something else for us to fix. Find and submit more of these problems.
709
710=head2 $AUTOLOAD
711
712=head2 exit/die
713
714Consistent semantics for exit/die in threads.
715
716=head2 External threads
717
718Better support for externally created threads.
719
720=head2 Thread::Pool
721
722=head2 thread-safety
723
724Spot-check globals like statcache and global GVs for thread-safety.
725"B<Part done>", says Sarathy.
726
727=head2 Per-thread GVs
728
729According to Sarathy, this would make @_ be the same in threaded
730and non-threaded, as well as helping solve problems like filehandles
731(the same filehandle currently cannot be used in two threads).
732
733=head1 Compiler
734
735=head2 Optimization
736
737The compiler's back-end code-generators for creating bytecode or
738compilable C code could use optimization work.
739
740=head2 Byteperl
741
742Figure out how and where byteperl will be built for the various
743platforms.
744
745=head2 Precompiled modules
746
747Save byte-compiled modules on disk.
748
749=head2 Executables
750
751Auto-produce executable.
752
753=head2 Typed lexicals
754
755Typed lexicals should affect B::CC::load_pad.
756
757=head2 Win32
758
759Workarounds to help Win32 dynamic loading.
760
e50bb9a1 761=head2 END blocks
762
7d30b5c4 763END blocks need saving in compiled output, now that CHECK blocks
4f25aa18 764are available.
e50bb9a1 765
766=head2 _AUTOLOAD
767
768_AUTOLOAD prodding.
769
770=head2 comppadlist
771
772Fix comppadlist (names in comppad_name can have fake SvCUR
773from where newASSIGNOP steals the field).
774
775=head2 Cached compilation
776
777Can we install modules as bytecode?
778
04c70446 779=head2 Filenames
780
83df6a1d 781Ongoing effort: keep filenames in the distribution and in the standard
782module set be 8.3 friendly where feasible. Good luck changing the
783standard modules, though.
04c70446 784
785=head2 Foreign lines
786
787Perl should be more generous in accepting foreign line terminations.
788Mostly B<done> in 5.005.
789
790=head2 Namespace cleanup
791
792 symbol-space: "pl_" prefix for all global vars
793 "Perl_" prefix for all functions
794
795 CPP-space: stop malloc()/free() pollution unless asked
796
04c70446 797=head2 ISA.pm
798
799Rename and alter ISA.pm. B<Done>. It is now base.pm.
800
04c70446 801=head2 autocroak?
802
106325ad 803This is the Fatal.pm module, so any builtin that does
04c70446 804not return success automatically die()s. If you're feeling brave, tie
805this in with the unified exceptions scheme.
806
e50bb9a1 807=cut