summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-16 16:16:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-16 16:16:17 (GMT)
commitf524129737d9ba3e685c31bacde844ec1db1fea9 (patch)
tree295f5f7c2479d75c0f0565c24fb0872c491289f4
parentbc62ca13c03a7f73b7091c26093c552776b749ee (diff)
parent5eb660ecd1965c67be0051c46b8e8a56b28ff5b2 (diff)
downloadgit-f524129737d9ba3e685c31bacde844ec1db1fea9.zip
git-f524129737d9ba3e685c31bacde844ec1db1fea9.tar.gz
git-f524129737d9ba3e685c31bacde844ec1db1fea9.tar.bz2
Merge branch 'ab/perl-i18n'
* ab/perl-i18n: perl/Makefile: install Git::I18N under NO_PERL_MAKEMAKER Git::I18N: compatibility with perl <5.8.3
-rw-r--r--perl/Git/I18N.pm11
-rw-r--r--perl/Makefile7
2 files changed, 15 insertions, 3 deletions
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 07597dc..40dd897 100644
--- a/perl/Git/I18N.pm
+++ b/perl/Git/I18N.pm
@@ -2,7 +2,16 @@ package Git::I18N;
use 5.008;
use strict;
use warnings;
-use Exporter 'import';
+BEGIN {
+ require Exporter;
+ if ($] < 5.008003) {
+ *import = \&Exporter::import;
+ } else {
+ # Exporter 5.57 which supports this invocation was
+ # released with perl 5.8.3
+ Exporter->import('import');
+ }
+}
our @EXPORT = qw(__);
our @EXPORT_OK = @EXPORT;
diff --git a/perl/Makefile b/perl/Makefile
index b2977cd..3e21766 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -23,15 +23,18 @@ clean:
ifdef NO_PERL_MAKEMAKER
instdir_SQ = $(subst ','\'',$(prefix)/lib)
$(makfile): ../GIT-CFLAGS Makefile
- echo all: private-Error.pm Git.pm > $@
- echo ' mkdir -p blib/lib' >> $@
+ echo all: private-Error.pm Git.pm Git/I18N.pm > $@
+ echo ' mkdir -p blib/lib/Git' >> $@
echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
+ echo ' $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
echo ' $(RM) blib/lib/Error.pm' >> $@
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
echo install: >> $@
echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
+ echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
+ echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@