X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/58640fb9e668911ee9625eae9923e1795f1b8082..83bfd1e6954a282bf60297dd96c31af20ee41e22:/t/007broken_links.t diff --git a/t/007broken_links.t b/t/007broken_links.t index f0162eba1..5ac03bca6 100644 --- a/t/007broken_links.t +++ b/t/007broken_links.t @@ -1,5 +1,11 @@ #!/usr/bin/perl +# adapted from Michael Stevens' test script posted in p5p +# in the thread "broken links in blead" from 01/19/2011 +# +# caveats: wikipedia seems to have crawler protection and +# will give 403 forbidden unless the user agent is faked. + use strict; use File::Find; use LWP::Simple; @@ -20,6 +26,7 @@ my $finder = URI::Find->new(sub { }); find(sub { + return unless -f $File::Find::name; open(FH, $File::Find::name) or return; my $text; { local $/; $text = ; }