From: James Bence Date: Wed, 16 Apr 2008 22:22:12 +0000 (-0700) Subject: [perl #53000] Patch for featured TODO: make a reproducible perlmodlib.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e42dfb1441e110bf697e136cebfeff74cf33d6f;p=p5sagit%2Fp5-mst-13.2.git [perl #53000] Patch for featured TODO: make a reproducible perlmodlib.PL From: "James Bence" (via RT) Message-ID: plus regen perlmodlib (from a clean source tree) and remove perltodo note p4raw-id: //depot/perl@33711 --- diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL index b7e5bf3..39e9613 100644 --- a/pod/perlmodlib.PL +++ b/pod/perlmodlib.PL @@ -10,36 +10,57 @@ open (MANIFEST, "../MANIFEST") or die $!; push @MANIFEST, 'lib/Config.pod', 'lib/Errno.pm', 'lib/lib.pm', 'lib/DynaLoader.pm', 'lib/XSLoader.pm'; --f "../lib/DynaLoader.pm" or die "Must be run from a source tree where perl has been built\n"; +# If run in a clean source tree, these will be missing because they are +# generated by the build. +my %generated = ( + 'encoding' => 'Allows you to write your script in non-ascii or non-utf8', + 'lib' => 'Manipulate @INC at compile time', + 'ops' => 'Restrict unsafe operations when compiling', + 'Config' => 'Access Perl configuration information', + 'DynaLoader' => 'Dynamically load C libraries into Perl code', + 'Errno' => 'System errno constants', + 'O' => 'Generic interface to Perl Compiler backends', + 'Safe' => 'Compile and execute code in restricted compartments', + 'XSLoader' => 'Dynamically load C libraries into Perl code', +); + +# If run in a clean source tree, these should not be reported. +# These are considered 'modules' by this script, but they really are not. +my %suppressed = map {$_ => 1} qw( + B::O + Encode::encoding + Opcode::Safe + Opcode::ops +); for (@MANIFEST) { - my $filename; - next unless s|^lib/|| or m|^ext/|; - my ($origfilename) = ($filename) = m|^(\S+)|; - $filename =~ s|^[^/]+/|| if $filename =~ s|^ext/||; - next unless $filename =~ m!\.p(m|od)$!; - unless (open (MOD, "../lib/$filename")) { - unless (open (MOD, "../$origfilename")) { - warn "Couldn't open ../$origfilename: $!"; - next; - } - $filename = $origfilename; - } + my $filename; + next unless s|^lib/|| or m|^ext/|; + my ($origfilename) = ($filename) = m|^(\S+)|; + $filename =~ s|^[^/]+/|| if $filename =~ s|^ext/||; + next unless $filename =~ m!\.p(m|od)$!; + unless (open (MOD, "../lib/$filename")) { + unless (open (MOD, "../$origfilename")) { + warn "Couldn't open ../$origfilename: $!"; + next; + } + $filename = $origfilename; + } my ($name, $thing); my $foundit=0; { - local $/=""; - while () { - next unless /^=head1 NAME/; - $foundit++; - last; - } + local $/=""; + while () { + next unless /^=head1 NAME/; + $foundit++; + last; + } } unless ($foundit) { - warn "$filename missing =head1 NAME (okay if there is respective .pod)\n"; - next; + warn "$filename missing =head1 NAME (OK if respective .pod exists)\n"; + next; } my $title = ; chomp($title); @@ -57,11 +78,12 @@ for (@MANIFEST) { ($name, $thing) = split / --? /, $title, 2; unless ($name and $thing) { - warn "$filename missing name\n" unless $name; - warn "$filename missing thing\n" unless $thing; - next; + warn "$filename missing name\n" unless $name; + warn "$filename missing thing\n" unless $thing; + next; } + next if $suppressed{$perlname}; $thing =~ s/^perl pragma to //i; $thing = ucfirst($thing); @@ -72,6 +94,17 @@ for (@MANIFEST) { } else { push @pragma, $title; } + + # if we find a generated one via the MANIFEST, no need to add later. + delete $generated{$perlname}; +} +while (my ($name,$desc) = each %generated) { + my $title = "=item $name\n\n$desc\n\n"; + if ($name =~ /[A-Z]/) { + push @mod, $title; + } else { + push @pragma, $title; + } } print OUT <<'EOF'; diff --git a/pod/perlmodlib.pod b/pod/perlmodlib.pod index 164b9cf..c0a447e 100644 --- a/pod/perlmodlib.pod +++ b/pod/perlmodlib.pod @@ -151,6 +151,10 @@ Restrict unsafe operations when compiling Package for overloading Perl operations +=item parent + +Establish an ISA relationship with base classes at compile time + =item re Alter regular expression behaviour @@ -221,6 +225,14 @@ don't have the gdbm library. Provide framework for multiple DBMs +=item App::Prove + +Implements the C command. + +=item App::Prove::State + +State storage for the C command. + =item Archive::Extract A generic archive extracting mechanism @@ -265,6 +277,10 @@ Perl compiler backend to produce perl code Perl lint +=item B::Lint::Debug + +Adds debugging stringification to B:: + =item B::Showlex Show lexical variables used in functions or files @@ -673,6 +689,10 @@ Methods to override UN*X behaviour in ExtUtils::MakeMaker DOS specific subclass of ExtUtils::MM_Unix +=item ExtUtils::MM_Darwin + +Special behaviors for OS X + =item ExtUtils::MM_MacOS Once produced Makefiles for MacOS Classic @@ -1017,6 +1037,10 @@ IO:: style interface to L Finding and running system commands made easy +=item IPC::Msg + +SysV Msg IPC object class + =item IPC::Open2 Open a process for both reading and writing @@ -1025,17 +1049,17 @@ Open a process for both reading and writing Open a process for reading, writing, and error handling -=item IPC::SysV +=item IPC::Semaphore -SysV IPC constants +SysV Semaphore IPC object class -=item IPC::SysV::Msg +=item IPC::SharedMem -SysV Msg IPC object class +SysV Shared Memory IPC object class -=item IPC::SysV::Semaphore +=item IPC::SysV -SysV Semaphore IPC object class +System V IPC constants and system calls =item List::Util @@ -1645,6 +1669,118 @@ Perl interface to the UNIX syslog(3) calls Win32 support for Sys::Syslog +=item TAP::Base + +Base class that provides common functionality to L and L + +=item TAP::Formatter::Color + +Run Perl test scripts with color + +=item TAP::Formatter::Console + +Harness output delegate for default console output + +=item TAP::Formatter::Console::ParallelSession + +Harness output delegate for parallel console output + +=item TAP::Formatter::Console::Session + +Harness output delegate for default console output + +=item TAP::Harness + +Run test scripts with statistics + +=item TAP::Parser + +Parse L output + +=item TAP::Parser::Aggregator + +Aggregate TAP::Parser results + +=item TAP::Parser::Grammar + +A grammar for the Test Anything Protocol. + +=item TAP::Parser::Iterator + +Internal TAP::Parser Iterator + +=item TAP::Parser::Iterator::Array + +Internal TAP::Parser Iterator + +=item TAP::Parser::Iterator::Process + +Internal TAP::Parser Iterator + +=item TAP::Parser::Iterator::Stream + +Internal TAP::Parser Iterator + +=item TAP::Parser::Multiplexer + +Multiplex multiple TAP::Parsers + +=item TAP::Parser::Result + +TAP::Parser output + +=item TAP::Parser::Result::Bailout + +Bailout result token. + +=item TAP::Parser::Result::Comment + +Comment result token. + +=item TAP::Parser::Result::Plan + +Plan result token. + +=item TAP::Parser::Result::Pragma + +TAP pragma token. + +=item TAP::Parser::Result::Test + +Test result token. + +=item TAP::Parser::Result::Unknown + +Unknown result token. + +=item TAP::Parser::Result::Version + +TAP syntax version token. + +=item TAP::Parser::Result::YAML + +YAML result token. + +=item TAP::Parser::Source + +Stream output from some source + +=item TAP::Parser::Source::Perl + +Stream Perl output + +=item TAP::Parser::Utils + +Internal TAP::Parser utilities + +=item TAP::Parser::YAMLish::Reader + +Read YAMLish data from iterator + +=item TAP::Parser::YAMLish::Writer + +Write YAMLish data + =item Term::ANSIColor Color screen output using ANSI escape sequences @@ -1689,34 +1825,6 @@ Turn on colour in Test::Builder::Tester Run Perl standard test scripts with statistics -=item Test::Harness::Assert - -Simple assert - -=item Test::Harness::Iterator - -Internal Test::Harness Iterator - -=item Test::Harness::Point - -Object for tracking a single test point - -=item Test::Harness::Results - -Object for tracking results from a single test file - -=item Test::Harness::Straps - -Detailed analysis of test results - -=item Test::Harness::TAP - -Documentation for the TAP format - -=item Test::Harness::Util - -Utility functions for Test::Harness::* - =item Test::More Yet another framework for writing test scripts diff --git a/pod/perltodo.pod b/pod/perltodo.pod index ad65045..f4e81f1 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -64,12 +64,6 @@ implements a very basic check for pod files, but the errors it discovers aren't found by podchecker. Add this check to podchecker, get rid of checkpods and have C use podchecker. -=head2 perlmodlib.PL rewrite - -Currently perlmodlib.PL needs to be run from a source directory where perl -has been built, or some modules won't be found, and others will be -skipped. 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::Harness