my $acc = I18N::AcceptLanguage->new();
my %all_langs = map { $_ => 1 } (@LANGUAGES, @DDTP_LANGUAGES);
my $acc = I18N::AcceptLanguage->new();
my %all_langs = map { $_ => 1 } (@LANGUAGES, @DDTP_LANGUAGES);
set_param_once( $input, \%params_set, 'suite', $s);
} elsif (!$need_pkg && $SECTIONS{$_}) {
set_param_once( $input, \%params_set, 'section', $_);
set_param_once( $input, \%params_set, 'suite', $s);
} elsif (!$need_pkg && $SECTIONS{$_}) {
set_param_once( $input, \%params_set, 'section', $_);
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
} elsif (!$need_pkg && ($_ eq 'source')) {
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
} elsif (!$need_pkg && ($_ eq 'source')) {
} elsif ($ARCHITECTURES{$_}) {
set_param_once( $input, \%params_set, 'arch', $_)
unless $_ eq 'any';
} elsif ($ARCHITECTURES{$_}) {
set_param_once( $input, \%params_set, 'arch', $_)
unless $_ eq 'any';
} elsif ($PRIORITIES{$_}) {
set_param_once( $input, \%params_set, 'priority', $_);
} else {
} elsif ($PRIORITIES{$_}) {
set_param_once( $input, \%params_set, 'priority', $_);
} else {
replace => { all => \@ARCHIVES,
default => \@ARCHIVES} },
exact => { default => 0, match => '^(\w+)$', },
replace => { all => \@ARCHIVES,
default => \@ARCHIVES} },
exact => { default => 0, match => '^(\w+)$', },
- lang => { default => $http_lang, match => '^(\w+)$', },
+ lang => { default => $http_lang, match => '^([\w-]+)$', },
source => { default => 0, match => '^(\d+)$', },
debug => { default => 0, match => '^(\d+)$', },
searchon => { default => 'names', match => '^(\w+)$', },
source => { default => 0, match => '^(\d+)$', },
debug => { default => 0, match => '^(\d+)$', },
searchon => { default => 'names', match => '^(\w+)$', },
- my $cat = Packages::I18N::Locale->get_handle( $opts{lang} )
- || Packages::I18N::Locale->get_handle( 'en' );
- die "get_handle failed for $opts{lang}" unless $cat;
+ my $cat = Packages::I18N::Locale->get_handle( $opts{lang}, "en" )
+ or die "get_handle failed for $opts{lang}";