Imported Upstream version 0.12
[libwww-opensearch-perl.git] / lib / WWW / OpenSearch / Url.pm
index 6e4c27f..320c1f4 100644 (file)
@@ -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';