>>>>> On Sun, 29 Apr 2001 01:04:07 +0200 (CEST), "echo 'Rudolf Polzer'>/dev/null" 
><[EMAIL PROTECTED]> said:

  > Name: Rudolf Polzer
  > Interface style: f
  > Mail: [EMAIL PROTECTED]
  > UserID: rpolzer

Done

  > Module I am planning to contribute: autodetection of modules
  > DSLI: Mdpf
  > Description: Autodetect of modules: find available module

What's the name of the module? Module::Detect sounds OK,
Module::Detect::Use sounds overkill. Module::Find would also be cute.
Some function in it could return the path to the module without
actually trying to require it. Another function could then require it.
Or some such.

If you've made up your mind, please apply for registration with the
"Apply for namespace registration" menu on PAUSE. Thank you!

-- 
andreas

  > 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