Skip to content

Commit

Permalink
Git::I18N: compatibility with perl <5.8.3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Mar 10, 2012
1 parent 0dbe659 commit 3e9c6a0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion perl/Git/I18N.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3e9c6a0

Please sign in to comment.