Browse Source

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>
maint
Pavel Roskin 19 years ago committed by Junio C Hamano
parent
commit
1d8c9dc47d
  1. 4
      perl/Makefile.PL
  2. 0
      perl/private-Error.pm

4
perl/Makefile.PL

@ -12,9 +12,9 @@ my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm'); @@ -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(

0
perl/Error.pm → perl/private-Error.pm

Loading…
Cancel
Save