mod_perl: Modules should always be required by module name, not

Max Kanat-Alexander mkanat at bugzilla.org
Thu Jun 29 15:02:37 UTC 2006


On Thu, 2006-06-29 at 16:45 +0200, Guillaume Rousse wrote:
> Why require (evaluated at runtime), instead of use (evaluated at compile
> time) ?

	Usually we're doing this because we need to dynamically load a module,
which can't be done at compile time. That is, we're loading some module
that depends on a variable. Like "Bugzilla::DB::$db_driver" for example.

	Most of the time doing require Bugzilla "Bugzilla/DB/$db_driver.pm"
would work fine, even in mod_perl, but it's probably just better to do
it the other way.

	-Max
-- 
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.




More information about the developers mailing list