summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-06-30 01:09:23 -0400
committerJunio C Hamano <junkio@cox.net>2006-07-02 17:14:44 -0700
commit1d8c9dc47de0cbf3955ccc9408564cccbda8e348 (patch)
treebca0370fa6450cfdf965dc352bdf60f568ce8e6d
parent3553309f5ba7f9fed61ac2767d53677c309826b2 (diff)
downloadgit-1d8c9dc47de0cbf3955ccc9408564cccbda8e348.tar.gz
Fix probing for already installed Error.pm
The syntax for 'require' was wrong, and it was always failing, which resulted in installing our own version of Error.pm anyways. Now we used to ship our own Error.pm in the same directory, so after fixing the syntax, 'require' always succeeds, but it does not test if the platform has Error.pm module installed anymore. So rename the source we ship to private-Error.pm, and install that as Error.pm when the platform does not have one already. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--perl/Makefile.PL4
-rw-r--r--perl/private-Error.pm (renamed from perl/Error.pm)0
2 files changed, 2 insertions, 2 deletions
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index d401a6609b..25ae54a515 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -12,9 +12,9 @@ my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
# We come with our own bundled Error.pm. It's not in the set of default
# Perl modules so install it if it's not available on the system yet.
-eval { require 'Error' };
+eval { require Error };
if ($@) {
- $pm{'Error.pm'} = '$(INST_LIBDIR)/Error.pm';
+ $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
}
WriteMakefile(
diff --git a/perl/Error.pm b/perl/private-Error.pm
index ebd07498a2..ebd07498a2 100644
--- a/perl/Error.pm
+++ b/perl/private-Error.pm