FirstGoodURL

 view release on metacpan or  search on metacpan

FirstGoodURL.pm  view on Meta::CPAN

  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)) {

README  view on Meta::CPAN

      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)) {



( run in 1.043 second using v1.01-cache-2.11-cpan-39bf76dae61 )