Why not look at it from the upside down? Use mod_rewrite or aliases for your script paths, but put all the OEM/Programs BELOW the GT Engine code. Consider them highly advanced plugins to the core/base code, that overrides the base code, rather than "hooking" into it.
Code:
cgi-bin/
admin/
GT/
LinksSQL/ (base/shared lib path //.../cgi-bin/admin/GT)
GForum/
user_scripts/
gforum.cgi (init path ../admin/Gforum/*)
lsql_add.cgi
lsql_review.cgi
lsql_page.cgi
To make it more compatible, you could make a links.cgi that took a do= parameter, and get rid of all the user scripts in favor of one dispatcher.
To get "pretty" urls, use mod_rewrite to shorten paths.
Putting the GT::Template and GT::SQL engines on CPAN is a potentially good idea, since the real functionality comes from the Links SQL wrapper code for user authentication and global object set up. If you do release those objects, you'd want to consider slicing out the code in Links SQL that does the authentication, and set up, so that the modules are usable "out of the box" and all a user had to do was actually come up with something to do with the modules. Without the logon/authentication/init codes the modules are good, but still just a cryptic toolbox.
It would mean a restructuring of the Links SQL program, to pull the generic modules/parts out of the tight integration with the OEM Links SQL application.
Although, building in a skelleton application, that branches to the search, add, modify, etc routines, but leaves them empty wouldn't be a bad idea either. Since most applications being built would be similar to Links, releasing the framework would make the modules usable, but the actual code would not be released. eg: add.cgi/add.pm are not released, the admin system isn't released, etc. Just the framework to initialize and deal with them.
GT::Template
GT::SQL
GT::Authenticate
Code:
use strict;
use lib '/path/to/admin';
use Links qw/$DB $IN $USER $CFG/;
local $SIG{__DIE__} = \&Links::fatal;
Links::init('/path/to/admin');
Links::init_user();
use Site::HTML;
sub main {
## start writing your program
}
This is the older header info, but the modules need to be able to be initialized this easily, by the end user, or they are just another set of access routines.
From this point, database access is 3 lines of code, template parsing is 1 line.
PUGDOG� Enterprises, Inc. The best way to contact me is to
NOT use Email.
Please leave a PM here.