Duke's utils
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
406 B

#!/usr/bin/env perl
use strict;
use warnings;
use Test::WWW::Mechanize;
use Test::Most;
use Data::Dumper;
my $m = Test::WWW::Mechanize->new;
my $url = shift || die "Usage: $0 URL";
$m->get_ok($url);
my @links = $m->links;
my @local_links = grep { $_->url !~ m/:/} @links;
my @remote_links = grep { $_->url =~ m/:/ } @links;
# only checks remote links currently
map { $m->get_ok($_) } @remote_links;