projects
/
libwww-opensearch-perl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import WWW::Opensearch 0.12
[libwww-opensearch-perl.git]
/
lib
/
WWW
/
OpenSearch
/
Url.pm
diff --git
a/lib/WWW/OpenSearch/Url.pm
b/lib/WWW/OpenSearch/Url.pm
index
6e4c27f
..
320c1f4
100644
(file)
--- 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;
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';
$params->{ language } ||= '*';
$params->{ outputEncoding } ||= 'UTF-8';
$params->{ inputEncoding } ||= 'UTF-8';