I sometimes put modules in a subdirectory of a (CGI) script when I have very custom versions of a module per script, and that way, it's easy to keep track of which module version belongs to which script. Actually, they're more like loadable sections of the main script, on demand. Plus, they're easier to copy to different systems, that way.
The way I keep them from prying eyes, is by denying access to them through the HTTP server, by placing a deny from all rule on *.pm files, in my .htaccess file.
The only other problem I can think of, is the value of the current directory when the script is run, in order to find that libroot. You cannot be 100% sure that it's the directory the script is in — though for CGI, that is generally the case. In theory, FindBin should be able to help locate the script, but I've had it more fail to do anything at all, than actually help.
In reply to Re: •Re: Location of perl modules
by bart
in thread Location of perl modules
by CodeJunkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |