What about just lazy requiring inside _temp_cache() so it
won't get loaded by folks that don't need it? (completely untested):
eval { require File::Temp };
if ($@) {
throw Error::Simple("couldn't require File::Temp: $@");
}
eval { require File::Spec };
if ($@) {
throw Error::Simple("couldn't require File::Spec: $@");
}
It'll also remove the minor performance hit CGI/gitweb users got since
we won't load these extra modules during startup.
Fwiw, git-svn has been a File::Temp user for a few months since Adam's
cat-file optimization; but it also has lower visibility since boxes
with <5.6.1 probably don't have SVN. git-svn previously used
IO::File->new_tmpfile exclusively (and very heavily).
--
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html