Changeset 2202

Show
Ignore:
Timestamp:
04/25/07 00:28:05
Author:
bricas
Message:

change = idiom to handle definedness

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WWW-OpenSearch/trunk/lib/WWW/OpenSearch/Url.pm

    r2137 r2202  
    7575    my( $self, $params ) = @_; 
    7676    my $tmpl = $self->template; 
    77      
    78     $params->{ startIndex     } ||= 1; 
    79     $params->{ startPage      } ||= 1; 
     77    
     78    for( qw( startIndex startPage ) { 
     79        $params->{ $_ } = 1 if !defined $params->{ $_ }; 
     80    } 
    8081    $params->{ language       } ||= '*'; 
    8182    $params->{ outputEncoding } ||= 'UTF-8';