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 );
$opts{source} = 1;
$opts{searchon} = 'names',
$opts{searchon_form} = 'sourcenames';
+} 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;