-sub checkconfig () { #{{{
- foreach my $required (qw(url)) {
- if (! length $config{$required}) {
- error(sprintf(gettext("Must specify %s when using the google search plugin"), $required));
- }
+sub checkconfig () {
+ if (! length $config{url}) {
+ error(sprintf(gettext("Must specify %s when using the %s plugin"), "url", 'google search'));
+ }
+ my $uri=URI->new($config{url});
+ if (! $uri || ! defined $uri->host) {
+ error(gettext("Failed to parse url, cannot determine domain name"));