while(my ($tag, $att_list) = each %TAGS) { my @list = $tree->look_down('_tag',$tag); foreach my $item (@list) { foreach my $attr(@{$att_list}) { next unless $item->attr($attr); next unless length (my $a = $item->attr($attr)); next if $a =~ /mailto:/; my $target = URI->new_abs($a, $base); next unless $self->compareHosts($target,$url); next unless $self->validScheme($url,['http']); next unless $self->allowed($url); unless(exists $self->[GOOD_LINKS]->{$a}) { $item->attr($attr,$target->rel($base)); push @{$queue}, $target; } } } }