New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for featured TODO: make a reproducible perlmodlib.PL #9293
Comments
From wsjbence@gmail.comHi: --James |
From wsjbence@gmail.comperlmodlib.PL.patch*** perl-5.10.0/pod/perlmodlib.PL.old Tue Dec 18 02:47:08 2007
--- perl-5.10.0/pod/perlmodlib.PL Wed Apr 16 22:05:57 2008
***************
*** 10,45 ****
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";
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 ($name, $thing);
my $foundit=0;
{
! local $/="";
! while (<MOD>) {
! next unless /^=head1 NAME/;
! $foundit++;
! last;
! }
}
unless ($foundit) {
! warn "$filename missing =head1 NAME (okay if there is respective .pod)\n";
! next;
}
my $title = <MOD>;
chomp($title);
--- 10,66 ----
push @MANIFEST, 'lib/Config.pod', 'lib/Errno.pm', 'lib/lib.pm',
'lib/DynaLoader.pm', 'lib/XSLoader.pm';
! # 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 ($name, $thing);
my $foundit=0;
{
! local $/="";
! while (<MOD>) {
! next unless /^=head1 NAME/;
! $foundit++;
! last;
! }
}
unless ($foundit) {
! warn "$filename missing =head1 NAME (OK if respective .pod exists)\n";
! next;
}
my $title = <MOD>;
chomp($title);
***************
*** 57,67 ****
($name, $thing) = split / --? /, $title, 2;
unless ($name and $thing) {
! warn "$filename missing name\n" unless $name;
! warn "$filename missing thing\n" unless $thing;
! next;
}
$thing =~ s/^perl pragma to //i;
$thing = ucfirst($thing);
--- 78,89 ----
($name, $thing) = split / --? /, $title, 2;
unless ($name and $thing) {
! 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,78 ****
--- 94,111 ----
} 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';
=for maintainers
|
From @rgsThanks, applied as change #33711 (and perlmodlib.pod regenerated). Next time, please provide a patch in unified diff format (diff -u). |
The RT System itself - Status changed from 'new' to 'open' |
@rgs - Status changed from 'open' to 'resolved' |
From @floatingatollI accidentally did more work on this todo because it's still listed at (1) Descriptions are now pulled from the source file. I updated perlmodlib.PL to list the filename containing the pod (2) Two modules that went missing from the pod are returned. The generated pod now includes two modules that went missing for no (3) Regenerated perlmodlib.pod from a ./Configure -des w/miniperl source A great deal of modules appear to have been added since the last time Cheers! (This is a "git diff blead..work" patch, rather than a bundle or - R. |
From @nwc10On Mon, Jan 12, 2009 at 11:02:42PM -0800, Richard Soderberg via RT wrote:
Without properly reading the rest of your message, this prompted me to change This is a list of wishes for Perl. The most up to date version of this file Hmm, we have the source to gitweb, don't we. I see /blob_plain/ in that URL. Nicholas Clark |
From @rgs2009/1/13 Richard Soderberg via RT <perlbug-followup@perl.org>:
This patch is not good to apply as-is: the resulting perlmodlib.PL
Commits are prefferred. |
From @floatingatollOn Fri, Jan 16, 2009 at 8:11 AM, Rafael Garcia-Suarez via RT <
Something must be wrong with my git checkout then, as I've been testing it cd pod/ && make perlmodlib.pod Apologies for the failed patch, I'll try again someday. - R. |
Migrated from rt.perl.org#53000 (status was 'resolved')
Searchable as RT53000$
The text was updated successfully, but these errors were encountered: