use Packages::Sections;
use Packages::DoSearch;
+use Packages::DoSearchContents;
use Packages::DoShow;
use Packages::DoDownload;
use Packages::DoFilelist;
my $what_to_do = 'show';
my $source = 0;
-if (my $path = $input->path_info()) {
+if (my $path = $input->path_info() || $input->param('PATH_INFO')) {
my @components = grep { $_ } map { lc $_ } split /\/+/, $path;
debug( "components[0]=$components[0]", 2 );
match => '^([\w-]+)$',
array => ',', var => \@archives,
replace => { all => \@ARCHIVES,
- default => [qw(us security non-US)]} },
+ default => [qw(us security non-US)]} },
exact => { default => 0, match => '^(\w+)$', },
source => { default => 0, match => '^(\d+)$', },
searchon => { default => 'names', match => '^(\w+)$', },
subsection => { default => 'default', match => '^([\w-]+)$',
array => ',', var => \@subsections,
replace => { default => [] } },
- arch => { default => 'any', match => '^(\w+)$',
+ arch => { default => 'any', match => '^([\w-]+)$',
array => ',', var => \@archs, replace =>
{ any => \@ARCHITECTURES } },
);
} else {
$opts{searchon_form} = $opts{searchon};
}
+if ($opts{searchon} eq 'contents' or $opts{searchon} eq 'filenames') {
+ $what_to_do = 'search_contents';
+}
my $pet1 = new Benchmark;
my $petd = timediff($pet1, $pet0);