OSDN Git Service

Fix probing for already installed Error.pm
authorPavel Roskin <proski@gnu.org>
Fri, 30 Jun 2006 05:09:23 +0000 (01:09 -0400)
committerJunio C Hamano <junkio@cox.net>
Mon, 3 Jul 2006 00:14:44 +0000 (17:14 -0700)
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>
perl/Makefile.PL
perl/private-Error.pm [moved from perl/Error.pm with 100% similarity]

index d401a66..25ae54a 100644 (file)
@@ -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(
similarity index 100%
rename from perl/Error.pm
rename to perl/private-Error.pm