Git::I18N: compatibility with perl <5.8.3
Change the Exporter invocation in Git::I18N to be compatible with 5.8.0 to 5.8.2 inclusive. Before Exporter 5.57 (released with 5.8.3) Exporter didn't export the 'import' subroutine. Reported-by: Tom G. Christensen <tgc@statsbiblioteket.dk> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Mar 10, 2012 at 12:29 UTC
3e9c6a08c8a99349a2969f5e2c37b77a6bac9b8c
1 file changed
+10
-1
perl/Git/I18N.pm
+10
-1
@@ -2,7 +2,16 @@ package Git::I18N;
2
use 5.008;
3
use strict;
4
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
+}
15
16
our @EXPORT = qw(__);
17
our @EXPORT_OK = @EXPORT;