perltodo.pod

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· POD 代码 · 共 882 行 · 第 1/3 页

POD
882
字号
=head1 NAMEperltodo - Perl TO-DO List=head1 DESCRIPTIONThis is a list of wishes for Perl. The tasks we think are smaller or easierare listed first. Anyone is welcome to work on any of these, but it's a goodidea to first contact I<perl5-porters@perl.org> to avoid duplication ofeffort. By all means contact a pumpking privately first if you prefer.Whilst patches to make the list shorter are most welcome, ideas to add tothe list are also encouraged. Check the perl5-porters archives for pastideas, and any discussion about them. One set of archives may be found at:    http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/What can we offer you in return? Fame, fortune, and everlasting glory? Maybenot, but if your patch is incorporated, then we'll add your name to theF<AUTHORS> file, which ships in the official distribution. How many otherprogramming languages offer you 1 line of immortality?=head1 Tasks that only need Perl knowledge=head2 Remove duplication of test setup.Schwern notes, that there's duplication of code - lots and lots of tests havesome variation on the big block of C<$Is_Foo> checks.  We can safely put thisinto a file, change it to build an C<%Is> hash and require it.  Maybe just putit into F<test.pl>. Throw in the handy tainting subroutines.=head2 merge common code in installperl and installmanThere are some common subroutines and a common C<BEGIN> block in F<installperl>and F<installman>. These should probably be merged. It would also be good tocheck for duplication in all the utility scripts supplied in the sourcetarball. It might be good to move them all to a subdirectory, but this wouldrequire careful checking to find all places that call them, and change thosecorrectly.=head2 common test code for timed bail outWrite portable self destruct code for tests to stop them burning CPU ininfinite loops. This needs to avoid using alarm, as some of the tests aretesting alarm/sleep or timers.=head2 POD -E<gt> HTML conversion in the core still sucksWhich is crazy given just how simple POD purports to be, and how simple HTMLcan be. It's not actually I<as> simple as it sounds, particularly with theflexibility POD allows for C<=item>, but it would be good to improve thevisual appeal of the HTML generated, and to avoid it having any validationerrors. See also L</make HTML install work>, as the layout of installation treeis needed to improve the cross-linking.The addition of C<Pod::Simple> and its related modules may make this taskeasier to complete.=head2 merge checkpods and podcheckerF<pod/checkpods.PL> (and C<make check> in the F<pod/> subdirectory)implements a very basic check for pod files, but the errors it discoversaren't found by podchecker. Add this check to podchecker, get rid ofcheckpods and have C<make check> use podchecker.=head2 perlmodlib.PL rewriteCurrently perlmodlib.PL needs to be run from a source directory where perlhas been built, or some modules won't be found, and others will beskipped. Make it run from a clean perl source tree (so it's reproducible).=head2 Parallel testing(This probably impacts much more than the core: also the Test::Harnessand TAP::* modules on CPAN.)The core regression test suite is getting ever more comprehensive, which hasthe side effect that it takes longer to run. This isn't so good. Investigatewhether it would be feasible to give the harness script the B<option> ofrunning sets of tests in parallel. This would be useful for tests inF<t/op/*.t> and F<t/uni/*.t> and maybe some sets of tests in F<lib/>.Questions to answer=over 4=item 1How does screen layout work when you're running more than one test?=item 2How does the caller of test specify how many tests to run in parallel?=item 3How do setup/teardown tests identify themselves?=backPugs already does parallel testing - can their approach be re-used?=head2 Make Schwern poorerWe should have tests for everything. When all the core's modules are tested,Schwern has promised to donate to $500 to TPF. We may need volunteers tohold him upside down and shake vigorously in order to actually extract thecash.=head2 Improve the coverage of the core testsUse Devel::Cover to ascertain the core modules's test coverage, then addtests that are currently missing.=head2 test BA full test suite for the B module would be nice.=head2 Deparse inlined constantsCode such as this    use constant PI => 4;    warn PIwill currently deparse as    use constant ('PI', 4);    warn 4;because the tokenizer inlines the value of the constant subroutine C<PI>.This allows various compile time optimisations, such as constant foldingand dead code elimination. Where these haven't happened (such as the exampleabove) it ought be possible to make B::Deparse work out the name of theoriginal constant, because just enough information survives in the symboltable to do this. Specifically, the same scalar is used for the constant inthe optree as is used for the constant subroutine, so by iterating over allsymbol tables and generating a mapping of SV address to constant name, itwould be possible to provide B::Deparse with this functionality.=head2 A decent benchmarkC<perlbench> seems impervious to any recent changes made to the perl core. Itwould be useful to have a reasonable general benchmarking suite that roughlyrepresented what current perl programs do, and measurably reported whethertweaks to the core improve, degrade or don't really affect performance, toguide people attempting to optimise the guts of perl. Gisle would welcomenew tests for perlbench.=head2 fix tainting bugsFix the bugs revealed by running the test suite with the C<-t> switch (viaC<make test.taintwarn>).=head2 Dual life everythingAs part of the "dists" plan, anything that doesn't belong in the smallest perldistribution needs to be dual lifed. Anything else can be too. Figure out whatchanges would be needed to package that module and its tests up for CPAN, anddo so. Test it with older perl releases, and fix the problems you find.To make a minimal perl distribution, it's useful to look atF<t/lib/commonsense.t>.=head2 Improving C<threads::shared>Investigate whether C<threads::shared> could share aggregates properly withonly Perl level changes to shared.pm=head2 POSIX memory footprintIlya observed that use POSIX; eats memory like there's no tomorrow, and atvarious times worked to cut it down. There is probably still fat to cut out -for example POSIX passes Exporter some very memory hungry data structures.=head2 embed.pl/makedef.plThere is a script F<embed.pl> that generates several header files to prefixall of Perl's symbols in a consistent way, to provide some semblance ofnamespace support in C<C>. Functions are declared in F<embed.fnc>, variablesin F<interpvar.h>. Quite a few of the functions and variablesare conditionally declared there, using C<#ifdef>. However, F<embed.pl>doesn't understand the C macros, so the rules about which symbols are presentwhen is duplicated in F<makedef.pl>. Writing things twice is bad, m'kay.It would be good to teach C<embed.pl> to understand the conditionalcompilation, and hence remove the duplication, and the mistakes it has caused.=head2 use strict; and AutoLoadCurrently if you write    package Whack;    use AutoLoader 'AUTOLOAD';    use strict;    1;    __END__    sub bloop {        print join (' ', No, strict, here), "!\n";    }then C<use strict;> isn't in force within the autoloaded subroutines. It wouldbe more consistent (and less surprising) to arrange for all lexical pragmasin force at the __END__ block to be in force within each autoloaded subroutine.There's a similar problem with SelfLoader.=head1 Tasks that need a little sysadmin-type knowledgeOr if you prefer, tasks that you would learn from, and broaden your skillsbase...=head2 make HTML install workThere is an C<installhtml> target in the Makefile. It's marked as"experimental". It would be good to get this tested, make it work reliably, andremove the "experimental" tag. This would include=over 4=item 1Checking that cross linking between various parts of the documentation works.In particular that links work between the modules (files with POD in F<lib/>)and the core documentation (files in F<pod/>)=item 2Work out how to split C<perlfunc> into chunks, preferably one per functiongroup, preferably with general case code that could be used elsewhere.Challenges here are correctly identifying the groups of functions that gotogether, and making the right named external cross-links point to the rightpage. Things to be aware of are C<-X>, groups such as C<getpwnam> toC<endservent>, two or more C<=items> giving the different parameter lists, suchas    =item substr EXPR,OFFSET,LENGTH,REPLACEMENT    =item substr EXPR,OFFSET,LENGTH    =item substr EXPR,OFFSETand different parameter lists having different meanings. (eg C<select>)=back=head2 compressed man pagesBe able to install them. This would probably need a configure test to see howthe system does compressed man pages (same directory/different directory?same filename/different filename), as well as tweaking the F<installman> scriptto compress as necessary.=head2 Add a code coverage target to the MakefileMake it easy for anyone to run Devel::Cover on the core's tests. The stepsto do this manually are roughly=over 4=item *do a normal C<Configure>, but include Devel::Cover as a module to install(see F<INSTALL> for how to do this)=item *    make perl=item *    cd t; HARNESS_PERL_SWITCHES=-MDevel::Cover ./perl -I../lib harness=item *Process the resulting Devel::Cover database=backThis just give you the coverage of the F<.pm>s. To also get the C levelcoverage you need to=over 4=item *Additionally tell C<Configure> to use the appropriate C compiler flags forC<gcov>=item *    make perl.gcov(instead of C<make perl>)=item *

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?