On Fri, 11 Jan 2002, Terrence Brannon wrote:

> I was wondering something about DBIx::AnyDBD's implementation:
>
> Since eval "require $class" will automatically do a substitution
> of :: for / and then append .pm why does AnyDBD.pm always opt for
> specifying $filename.pm instead of specifying $module_name and
> letting Perl do the conversion?
>
> Needless to say, had you opted for $module_name requires over
> $filename.pm requires, then
> eval { require $filename } would be rewritten eval "require
> $module_name"

Just historical reasons really - growing up in mod_perl taught me that
eval EXPR is bad, and so I always do it that way. There's likely no
real-world performance benefit to it though, except that eval EXPR has to
invoke the parser, whereas my way doesn't.

-- 
<!-- Matt -->
<:->Get a smart net</:->

Reply via email to