my $self = shift;
my $url = shift;
my $pattern;
+ my $res;
return undef unless $self->_getval('enabled');
$self->debug("Matching %s against %s", $pattern, $url);
if ($url =~ m|$pattern|) {
$self->debug("Match");
- return wantarray?($self->_parse($url, $pattern), $pattern):$self->_parse($url, $pattern);
+ foreach ($self->connectors()) {
+ $self->debug("Using connector %s", $_->{'name'});
+ $self->selectconn($_);
+ $res = $self->_parse($url, $pattern);
+ if (defined($res)) {
+ $res->{'CONNECTOR'} = $_;
+ last;
+ }
+ }
+ return wantarray?($res, $pattern):$res;
}
}