FirstGoodURL - determines first successful URL in list


NAME

FirstGoodURL - determines first successful URL in list


SYNOPSIS

  use FirstGoodURL;
  use strict;
  my @URLs = (...);
  my $match;
  if ($match = FirstGoodURL->in(@URLs)) {
    print "good URL: $match\n";
  }
  else {
    print "no URL was alive\n";
  }
  if ($match = FirstGoodURL->with('image/png')->in(@URLs)) {
    print "PNG found at $match\n";
  }
  else {
    print "no PNG found\n";
  }
  if ($match = FirstGoodURL->with(200,204)->in(@URLs)) {
    print "Status: OK or No Content at $match\n";
  }
  else {
    print "no 200/204 found\n";
  }


DESCRIPTION

This module uses the LWP suite to scan through a list of URLs. It determines the first URL that returns a specified status code (with defaults to 200), and optionally, a specified Content-type.


Methods


TODO

Here is a listing of things that might be added to future versions.


AUTHOR

  Jeff "japhy" Pinyan
  CPAN ID: PINYAN
  japhy@pobox.com
  http://www.pobox.com/~japhy/

 FirstGoodURL - determines first successful URL in list