Skip to content

Commit f524129

Browse files
committed
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
2 parents bc62ca1 + 5eb660e commit f524129

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

perl/Git/I18N.pm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ package Git::I18N;
22
use 5.008;
33
use strict;
44
use warnings;
5-
use Exporter 'import';
5+
BEGIN {
6+
require Exporter;
7+
if ($] < 5.008003) {
8+
*import = \&Exporter::import;
9+
} else {
10+
# Exporter 5.57 which supports this invocation was
11+
# released with perl 5.8.3
12+
Exporter->import('import');
13+
}
14+
}
615

716
our @EXPORT = qw(__);
817
our @EXPORT_OK = @EXPORT;

perl/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ clean:
2323
ifdef NO_PERL_MAKEMAKER
2424
instdir_SQ = $(subst ','\'',$(prefix)/lib)
2525
$(makfile): ../GIT-CFLAGS Makefile
26-
echo all: private-Error.pm Git.pm > $@
27-
echo ' mkdir -p blib/lib' >> $@
26+
echo all: private-Error.pm Git.pm Git/I18N.pm > $@
27+
echo ' mkdir -p blib/lib/Git' >> $@
2828
echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
29+
echo ' $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
2930
echo ' $(RM) blib/lib/Error.pm' >> $@
3031
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
3132
echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
3233
echo install: >> $@
3334
echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
35+
echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
3436
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
37+
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
3538
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
3639
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
3740
echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@

0 commit comments

Comments
 (0)