On Thu, Jun 3, 2010 at 15:20, Petr Baudis [off-list ref] wrote:
On Thu, Jun 03, 2010 at 07:25:54PM +0530, Pavan Kumar Sunkara wrote:
quoted
-our $t0;
-if (eval { require Time::HiRes; 1; }) {
- $t0 = [Time::HiRes::gettimeofday()];
Why is this moved to Gitweb::Config? Shouldn't this be rather part of
Gitweb::Request?
quoted
+our @ISA = qw(Exporter);
This is also re-arranging deck chairs on the Titanic, but 'use base
qw(Exporter)' is nicer.
quoted
+# __DIR__ is taken from Dir::Self __DIR__ fragment
+sub __DIR__ () {
+ File::Spec->rel2abs(join '', (File::Spec->splitpath(__FILE__))[0, 1]);
}
-our $number_of_git_cmds = 0;
+use lib __DIR__ . "/lib";
Wouldn't it be more elegant to use FindBin? I'm just not sure how long
is it part of core Perl.
No, those don't do the same thing as discussed in previous
reviews. FindBin finds the invoked binary, Dir::Self finds the the
current file.