optional 'require'

Robert Rothenberg robrwo at gmail.com
Wed Dec 21 20:00:17 GMT 2005

An interesting trick might instead be to use Module::Pluggable:

  use Module::Pluggable search_path => ['DBD'];

  my @plugins = plugins(__PACKAGE__);

  # or @plugins = $self->plugins() if using objects

  print "@plugins";

DBD modules (should) require DBI to be installed already. This will give
you a list of available drivers on that machine.

More information about the london.pm mailing list