::Make::Page 'make_page';
use File::Slurper qw!read_text write_text!;
use JSON::Create 'write_json';
use JSON::Parse 'read_json';
use Convert::Moji 'make_regex';
our $VERSION = '0.02';
sub get_links
my $verbose = $options{verbose};
my $nook = $options{nook};
my $tempfile = "$out-temp.json";
my %skip;
my $ua = LWP::UserAgent->new (
agent => __PACKAGE__,
);
$ua->max_red
ut after five seconds (dead sites etc.)
$ua->timeout (5);
if (-f $out) {
my $old = read_json ($out);
for my $link (@$old) {
if ($link->{status} =~ /200/) {
$skip{$link->{link}} = $li
This outputs a JSON file containing the
link, the status, the location, and the files which contain the link.
The function L</html_report> generates an HTML representation of the
JSON file.
The fun
k the links returned by L</get_links> and write to a JSON file
specified by the C<out> option.
check_links ($links, out => "link-statuses.json");
Usually one would filter the links returned by L
links.
=head2 html_report
html_report (in => 'link-statuses.json', out => 'report.html');
Write an HTML report using the JSON output by L</get_links>. The
report consists of header HTML genera