Skip to content

Commit 3e9c6a0

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0dbe659 commit 3e9c6a0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
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;

0 commit comments

Comments
 (0)