Name: Rudolf Polzer
Interface style: f
Mail: [EMAIL PROTECTED]
UserID: rpolzer
Module I am planning to contribute: autodetection of modules
DSLI: Mdpf
Description: Autodetect of modules: find available module

The idea came from a posting in comp.lang.perl.misc in the thread "dynamic
creation of classes". After trying a little I thought: let's make a module
that loads the first one in a list that exists. Since many CGI providers
do not have a full Perl installation (often DB_File, Storable etc. are
missing) but falling back to using SDBM_File and Data::Dumper where not
needed shouldn't be done because of speed and space issues, I decided to
write an autodetect module just in Perl (so it can be installed anywhere).
Unfortunately I do not know which Perl version this requires; it works on
5.6.0 and does not use anything strange. It should work as long as
 eval "require CGI;"
returns true if and only if there is a module CGI, so a 5.00x version
should suffice.
There is already a module 'AndDBM_File' which does exactly use this; this
module is designed to be used for more than one purpose in the same
program and even allows user-supplied module names (there are even checks
for things like

Module::Detect::Use 'CGI; `rm -rf /`'

so that they do not blindly execute

require CGI; `rm -rf /`;

in eval()

).

.

Reply via email to