=head1 SYNOPSIS
cd t
- ./perl -I../lib porting/podcheck.t [--show_all] [--cpan] [--counts]
- [ FILE ...]
+ ./perl -I../lib porting/podcheck.t [--show_all] [--cpan] [--deltas]
+ [--counts] [ FILE ...]
./perl -I../lib porting/podcheck.t --add_link MODULE ...
./perl -I../lib porting/podcheck.t --regen
any blead-upstream links to such pods are valid.
This option will cause cpan upstream pods to be checked.
+=item --deltas
+
+Normally, all old perldelta pods are skipped, except to make sure that
+any links to such pods are valid. This is because they are considered
+stable, and perhaps trying to fix them will cause changes that will
+misrepresent Perl's history. But, this option will cause them to be checked.
+
=item --show_all
Normally, if the number of potential problems of a given type found for a
my $add_link = 0;
my $show_all = 0;
-# Assume that are to skip anything in /cpan
-my $do_upstream_cpan = 0;
+my $do_upstream_cpan = 0; # Assume that are to skip anything in /cpan
+my $do_deltas = 0; # And stable perldeltas
while (@ARGV && substr($ARGV[0], 0, 1) eq '-') {
my $arg = shift @ARGV;
elsif ($arg eq '-cpan') {
$do_upstream_cpan = 1;
}
+ elsif ($arg eq '-deltas') {
+ $do_deltas = 1;
+ }
elsif ($arg eq '-show_all') {
$show_all = 1;
}
--add_link -> Add the MODULE and man page references to the data base
--regen -> Regenerate the data file for $0
--cpan -> Include files in the cpan subdirectory.
+ --deltas -> Include stable perldeltas
--show_all -> Show all known potential problems
--counts -> Don't test, but give summary counts of the currently
existing database
my @files = @ARGV;
-if (($regen + $show_all + $show_counts + $do_upstream_cpan + $add_link) > 1) {
- croak "--regen, --show_all, --cpan, --counts, and --add_link are mutually exclusive";
+my $cpan_or_deltas = $do_upstream_cpan || $do_deltas;
+if (($regen + $show_all + $show_counts + $add_link + $cpan_or_deltas ) > 1) {
+ croak "--regen, --show_all, --counts, and --add_link are mutually exclusive\n and none can be run with --cpan nor --deltas";
}
my $has_input_files = @files;
-if ($has_input_files && ($regen || $show_counts || $do_upstream_cpan)) {
- croak "--regen, --counts and --cpan can't be used since using specific files";
+if ($has_input_files
+ && ($regen || $show_counts || $do_upstream_cpan || $do_deltas))
+{
+ croak "--regen, --counts, --deltas, and --cpan can't be used since using specific files";
}
if ($add_link && ! $has_input_files) {
# 'delta'. (Actually the currently developed one matches as well, but
# is a duplicate of perldelta.pod, so can be skipped, so fine for it to
# match this.
-my $only_for_interior_links_re = qr/ \b perl \d+ delta \. pod \b
- | ^ pod\/perltoc.pod $
+my $only_for_interior_links_re = qr/ ^ pod\/perltoc.pod $
/x;
+unless ($do_deltas) {
+ $only_for_interior_links_re = qr/$only_for_interior_links_re |
+ \b perl \d+ delta \. pod \b
+ /x;
+}
{ # Closure
my $first_time = 1;
if ($has_input_files) {
undef %known_problems;
- $do_upstream_cpan = 1; # In case one of the inputs is from cpan
-
+ $do_upstream_cpan = $do_deltas = 1; # In case one of the inputs is one
+ # of these types
}
else { # No input files -- go find all the possibilities.
if ($regen) {
if ($filename =~ /^cpan/) {
$checker->set_skip("CPAN is upstream for $filename");
}
- elsif ($filename =~ /perl\d+delta/) {
+ elsif ($filename =~ /perl\d+delta/ && ! $do_deltas) {
$checker->set_skip("$filename is a stable perldelta");
}
elsif ($filename =~ /perltoc/) {