On 7/21/06, Andy Lester <[EMAIL PROTECTED]> wrote:
On Jul 20, 2006, at 4:42 PM, Gabor Szabo wrote: > What would be the correct and easy way to test only links that are > internal to > the site. Maybe a > > page_internal_links_ok() method? How would you have it determine what's internal?
When deciding which page to follow I use this code: foreach my $link ($w->followable_links()) { next if $link->url =~ m{^http://} and $link->url !~ m{^$url}; } Where $url is the link to the main page (where I started the whole process). Right now this seems to be working. I think I should also collect the links that or skip this way and compare them to some pre defined list of expected outside links. Otherwise I might save them in a file and then have a script that will go over that list and check each link on the rare ocassion when I want to make sure all the external links work. Gabor