| Category: | Perl stuff |
| Author/Contact Info | jacques |
| Description: | This is a quick -n- dirty script for searching your local Perl modules and printing the results to a webpage. You can easily change it around for your needs. NOTE that the search is case insensitive and you can do partial searches, such as 'file::' to see all the modules in that particular namespace. See HTML::Perlinfo::Modules for more details and options.
NOTE: Do not use the code presented on this thread, as there is a security risk described below. In particular, Your Mother 's code example should not be implemented. HTML::Perlinfo::Modules will be updated with a security patch soon. UPDATE: 7/11/08 -- See the latest version at Perl modules search engine, part II. |
# copy & paste to a file called searchmods.cgi
use warnings;
use strict;
use CGI qw(header param);
use HTML::Perlinfo::Modules;
print header;
my $qry = param('qry') || "";
if ($qry) {
my $m = HTML::Perlinfo::Modules->new();
my $module = $m->print_modules( show_only => qr/$qry/i );
($module) ? print $module: print 'No such modules found!';
}
print <<EOD;
Module search:
<form action="searchmods.cgi" method="post">
<input type="text" name="qry" value="$qry">
<input type=submit name=submit value=submit>
</form>
EOD
|
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl module search engine
by Your Mother (Archbishop) on Jun 14, 2008 at 21:52 UTC | |
by jacques (Priest) on Jun 14, 2008 at 22:46 UTC | |
|
Re: Perl module search engine
by alexm (Chaplain) on Jun 15, 2008 at 14:24 UTC | |
by moritz (Cardinal) on Jun 15, 2008 at 14:50 UTC | |
by jacques (Priest) on Jun 15, 2008 at 21:02 UTC | |
by moritz (Cardinal) on Jun 15, 2008 at 21:48 UTC | |
by jacques (Priest) on Jun 15, 2008 at 22:17 UTC |