Re: [PATCH 1/3] Fix probing for already installed Error.pm

From: Junio C Hamano <junkio@cox.net>
Date: 2006-06-30 17:40:14
Junio C Hamano <junkio@cox.net> writes:

> Pavel Roskin <proski@gnu.org> writes:
>
>> diff --git a/perl/Makefile.PL b/perl/Makefile.PL
>> index d401a66..b3fbb73 100644
>> --- a/perl/Makefile.PL
>> +++ b/perl/Makefile.PL
>> @@ -12,7 +12,7 @@ my %pm = ('Git.pm' => '$(INST_LIBDIR)/Gi
>>  
>>  # 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';
>>  }
>
> The syntax updates is correct, but this is still wrong, I am
> afraid.
>
> It is trying to see if we need to install the Error.pm we ship
> just in case the system does not have Error.pm available.  But
> this script is run in perl/ directory where we have that private
> copy of Error.pm, so "require Error" always succeeds, eh, at
> least after you fixed the above syntax error X-<.

That is, we would want something like this.

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
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index b3fbb73..25ae54a 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -14,7 +14,7 @@ # We come with our own bundled Error.pm.
 # Perl modules so install it if it's not available on the system yet.
 eval { require Error };
 if ($@) {
-	$pm{'Error.pm'} = '$(INST_LIBDIR)/Error.pm';
+	$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
 }
 
 WriteMakefile(

-
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
Received on Fri Jun 30 17:40:51 2006

This archive was generated by hypermail 2.1.8 : 2006-06-30 17:41:16 EST