From 1d8c9dc47de0cbf3955ccc9408564cccbda8e348 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 30 Jun 2006 01:09:23 -0400 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- perl/Makefile.PL | 4 ++-- perl/{Error.pm => private-Error.pm} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename perl/{Error.pm => private-Error.pm} (100%) diff --git a/perl/Makefile.PL b/perl/Makefile.PL index d401a6609..25ae54a51 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 similarity index 100% rename from perl/Error.pm rename to perl/private-Error.pm -- 2.26.2