CGI-OptimalQuery
view release on metacpan or search on metacpan
demo/README view on Meta::CPAN
# add an apache alias to the CGI::OptimalQuery Resources directory
Alias /OptimalQuery/ /path/to/perl-CGI-OptimalQuery/lib/CGI/OptimalQuery/Resources/
# add a script alias to view the demos
ScriptAlias /OptimalQueryDemo/ /path/to/perl-CGI-OptimalQuery/demo/cgi-bin/
# configure file permissions so apache can access files
export OQBASEPATH=/path/to/perl-CGI-OptimalQuery
sudo chgrp -R apache $OQBASEPATH
sudo chmod -R u=rwX,go=rX $OQBASEPATH
sudo chmod -R ug+rwx $OQBASEPATH/demo/cgi-bin
# if SELinux is installed, set file contexts so apache process is not blocked
# run command: `sestatus` to determine if SELinux is enabled on your system
sudo chcon -R system_u:object_r:httpd_sys_content_t:s0 $OQBASEPATH/demo/cgi-bin
sudo chcon -R system_u:object_r:httpd_sys_rw_content_t:s0 $OQBASEPATH/demo/db
sudo chcon -R system_u:object_r:usr_t:s0 $OQBASEPATH/lib
# restart apache
sudo apachectl restart
demo/make_test_data.pl view on Meta::CPAN
$dbh->do("CREATE INDEX idx_manufact_name ON manufact (name)");
$dbh->do("CREATE INDEX idx_product_name ON product (name)");
$dbh->do("CREATE INDEX idx_product_prodno ON product (prodno)");
$dbh->do("CREATE INDEX idx_product_manufact ON product (manufact)");
$dbh->do("CREATE INDEX idx_inventory_barcode ON inventory(barcode)");
$dbh->do("CREATE INDEX idx_inventory_product ON inventory(product)");
$dbh->do("CREATE INDEX idx_inventory_owner ON inventory(owner)");
$dbh->commit();
$dbh->disconnect();
system("chmod -R ugo+rwX db");
( run in 0.232 second using v1.01-cache-2.11-cpan-496ff517765 )