#!/usr/bin/perl -w
use strict;
-use Digest::MD5 'md5';
use File::Find;
=head1 NAME
=cut
+# In some situations, eg cross-compiling, we get run with miniperl, so we can't use Digest::MD5
+my $has_md5;
+BEGIN {
+ use Carp;
+ $has_md5 = eval { require Digest::MD5; Digest::MD5->import('md5'); 1; };
+}
+
+
+# make it clearer when we haven't run to completion, as we can be quite
+# noisy when things are working ok
+
sub my_die {
print STDERR "$0: ", @_;
print STDERR "\n" unless $_[-1] =~ /\n\z/;
my $file = shift;
local $_;
+ return if !$has_md5;
+
# Initialise the list of possible source files on the first call.
unless (%Lengths) {
__prime_state() unless $state{master};
}
}
close $master or my_die("close pod/perl.pod: $!");
- # This has to be special-cased somewhere. Turns out this is cleanest:
- push @{$state{master}}, ['a2p', 'x2p/a2p.pod', {toc_omit => 1}];
my_die("perl.pod sets flags for unknown pods: "
. join ' ', sort keys %flag_set)