This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A more honest TODO
[perl5.git] / pod / perltodo.pod
1 =head1 NAME
2
3 perltodo - Perl TO-DO List
4
5 =head1 DESCRIPTION
6
7 This is a list of wishes for Perl.  Send updates to
8 I<perl5-porters@perl.org>.  If you want to work on any of these
9 projects, be sure to check the perl5-porters archives for past ideas,
10 flames, and propaganda.  This will save you time and also prevent you
11 from implementing something that Larry has already vetoed.  One set
12 of archives may be found at:
13
14     http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
15
16 =head1 assertions
17
18 Clean up and finish support for assertions. See L<assertions>.
19
20 =head1 iCOW
21
22 Sarathy and Arthur have a proposal for an improved Copy On Write which
23 specifically will be able to COW new ithreads. If this can be implemented
24 it would be a good thing.
25
26 =head1 (?{...}) closures in regexps
27
28 Fix (or rewrite) the implementation of the C</(?{...})/> closures.
29
30 =head1 pragmata
31
32 =head2 lexical pragmas
33
34 Reimplement the mechanism of lexical pragmas to be more extensible. Fix
35 current pragmas that don't work well (or at all) with lexical scopes or in
36 run-time eval(STRING) (C<sort>, C<re>, C<encoding> for example). MJD has a
37 preliminary patch that implements this.
38
39 =head2 use less 'memory'
40
41 Investigate trade offs to switch out perl's choices on memory usage.
42 Particularly perl should be able to give memory back.
43
44 =head1 prototypes and functions
45
46 =head2 _ prototype character
47
48 Study the possibility of adding a new prototype character, C<_>, meaning
49 "this argument defaults to $_".
50
51 =head2 inlining autoloaded constants
52
53 Currently the optimiser can inline constants when expressed as subroutines
54 with prototype ($) that return a constant. Likewise, many packages wrapping
55 C libraries export lots of constants as subroutines which are AUTOLOADed on
56 demand. However, these have no prototypes, so can't be seen as constants by
57 the optimiser. Some way of cheaply (low syntax, low memory overhead) to the
58 perl compiler that a name is a constant would be great, so that it knows to
59 call the AUTOLOAD routine at compile time, and then inline the constant.
60
61 =head2 Finish off lvalue functions
62
63 The old perltodo notes "They don't work in the debugger, and they don't work for
64 list or hash slices."
65
66 =head1 Unicode and UTF8
67
68 =head2 Implicit Latin 1 => Unicode translation
69
70 Conversions from byte strings to UTF-8 currently map high bit characters
71 to Unicode without translation (or, depending on how you look at it, by
72 implicitly assuming that the byte strings are in Latin-1). As perl assumes
73 the C locale by default, upgrading a string to UTF-8 may change the
74 meaning of its contents regarding character classes, case mapping, etc.
75 This should probably emit a warning (at least).
76
77 =head2 UTF8 caching code
78
79 The string position/offset cache is not optional. It should be.
80
81 =head1 Regexps
82
83 =head2 regexp optimiser optional
84
85 The regexp optimiser is not optional. It should configurable to be, to allow
86 its performance to be measured, and its bugs to be easily demonstrated.
87
88 =head2 common suffices/prefixes in regexps (trie optimization)
89
90 Currently, the user has to optimize C<foo|far> and C<foo|goo> into
91 C<f(?:oo|ar)> and C<[fg]oo> by hand; this could be done automatically.
92
93 =head1 POD
94
95 =head2 POD -> HTML conversion still sucks
96
97 =head1 Misc medium sized projects
98
99 =head2 UNITCHECK
100
101 Introduce a new special block, UNITCHECK, which is run at the end of a
102 compilation unit (module, file, eval(STRING) block). This will correspond to
103 the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the
104 O.pm/B.pm backend framework depends on it.
105
106 =head2 optional optimizer
107
108 Make the peephole optimizer optional.
109
110 =head2 lexical aliases
111
112 Allow lexical aliases (maybe via the syntax C<my \$alias = \$foo>.
113
114 =head2 no 6
115
116 Make C<no 6> and C<no v6> work (opposite of C<use 5.005>, etc.).
117
118 =head2 IPv6
119
120 Clean this up. Check everything in core works
121
122 =head2 entersub XS vs Perl
123
124 At the moment pp_entersub is huge, and has code to deal with entering both
125 perl and and XS subroutines. Subroutine implementations rarely change between 
126 perl and XS at run time, so investigate using 2 ops to enter subs (one for
127 XS, one for perl) and swap between if a sub is redefined.
128
129 =head2 @INC source filter to Filter::Simple
130
131 The second return value from a sub in @INC can be a source filter. This isn't
132 documented. It should be changed to use Filter::Simple, tested and documented.
133
134 =head2 bincompat functions
135
136 There are lots of functions which are retained for binary compatibility.
137 Clean these up. Move them to mathom.c, and don't compile for blead?
138
139 =head2 Use fchown/fchmod internally
140
141 The old perltodo notes "This has been done in places, but needs a thorough
142 code review. Also fchdir is available in some platforms."
143
144 =head2 foreach reverse
145
146 The old perltodo notes that we could optimise foreach to iterate in reverse.
147 (instead of making a reversed copy on the stack)
148
149 =head1 Tests
150
151 =head2 Make Schwern poorer
152
153 Tests for everything, At which point Schwern coughs up $500 to TPF.
154
155 =head2 test B
156
157 A test suite for the B module would be nice.
158
159 =head2 Improve tests for Config.pm
160
161 Config.pm doesn't appear to be well tested.
162
163 =head2 common test code for timed bailout
164
165 Write portable self destruct code for tests to stop them burning CPU in
166 infinite loops. Needs to avoid using alarm, as some of the tests are testing
167 alarm/sleep or timers.
168
169 =head1 Installation
170
171 =head2 compressed man pages
172
173 Be able to install them
174
175 =head2 Make Config.pm cope with differences between build and installed perl
176
177 =head2 Relocatable perl
178
179 Make it possible to create a relocatable perl binary. Will need some collusion
180 with Config.pm. We could use a syntax of ... for location of current binary?
181
182 =head2 make HTML install work
183
184 =head1 Incremental things
185
186 Some tasks that don't need to get done in one big hit.
187
188 =head2 autovivification
189
190 Make all autovivification consistent w.r.t LVALUE/RVALUE and strict/no strict;
191
192 =head2 fix tainting bugs
193
194 Fix the bugs revealed by running the test suite with the C<-t> switch (via
195 C<make test.taintwarn>).
196
197 =head2 Make tainting consistent
198
199 Tainting would be easier to use if it didn't take documented shortcuts and allow
200 taint to "leak" everywhere within an expression.
201
202 =head1 Vague things
203
204 Some more nebulous ideas
205
206 =head2 threads
207
208 Make threads more robust.
209
210 =head2 POSIX memory footprint
211
212 Ilya observed that use POSIX; eats memory like there's no tomorrow, and at
213 various times worked to cut it down. There is probably still fat to cut out -
214 for example POSIX passes Exporter some very memory hungry data structures.
215
216 =head2 Optimize away @_
217
218 The old perltodo notes "Look at the "reification" code in C<av.c>"
219
220 =head2 switch ops
221
222 The old perltodo notes "Although we have C<Switch.pm> in core, Larry points to
223 the dormant C<nswitch> and C<cswitch> ops in F<pp.c>; using these opcodes would
224 be much faster."
225
226 ** Attach/detach debugger from running program
227
228 The old perltodo notes "With C<gdb>, you can attach the debugger to a running
229 program if you pass the process ID. It would be good to do this with the Perl
230 debugger on a running Perl program, although I'm not sure how it would be done."
231 ssh and screen do this with named pipes in tmp. Maybe we can too.
232