X-Git-Url: http://erislabs.net/gitweb/?p=libwww-opensearch-perl.git;a=blobdiff_plain;f=lib%2FWWW%2FOpenSearch%2FUrl.pm;h=320c1f4cd3654cb99a99e0e6d8f0abcda2a97a1f;hp=6e4c27f7cadcc09b67ac06721d43fcf756eb444a;hb=c94f14c8a94caab1a3618ee0e347fb072b986478;hpb=f13ee300264fe995021793e000e03196304e9485 diff --git a/lib/WWW/OpenSearch/Url.pm b/lib/WWW/OpenSearch/Url.pm index 6e4c27f..320c1f4 100644 --- a/lib/WWW/OpenSearch/Url.pm +++ b/lib/WWW/OpenSearch/Url.pm @@ -74,9 +74,10 @@ sub new { sub prepare_query { my( $self, $params ) = @_; my $tmpl = $self->template; - - $params->{ startIndex } ||= 1; - $params->{ startPage } ||= 1; + + for( qw( startIndex startPage ) ) { + $params->{ $_ } = 1 if !defined $params->{ $_ }; + } $params->{ language } ||= '*'; $params->{ outputEncoding } ||= 'UTF-8'; $params->{ inputEncoding } ||= 'UTF-8';