CGI-Application-Search

 view release on metacpan or  search on metacpan

lib/CGI/Application/Search.pm  view on Meta::CPAN

584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
if (!$file) {
    warn "AUTO_SUGGEST_FILE was not specified!";
    return [];
} elsif (!-r $file) {
    warn "AUTO_SUGGEST_FILE $file is not readable!";
    return [];
}
 
# if we are going to use the cache (meaning we want to use
# it and there's up-to-date data in there)
my $file_mod_time = (stat($file))[9];
if (    $want_to_cache
    and @SUGGEST_CACHE
    and $SUGGEST_CACHE_TIME >= $file_mod_time)
{
    foreach my $cached (@SUGGEST_CACHE) {
 
        # if it starts with this $word
        if (index($cached, lc $word) == 0) {
            push(@suggestions, $cached);



( run in 1.002 second using v1.01-cache-2.11-cpan-49f99fa48dc )