aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2012-03-10 12:29:34 +0000
committerJunio C Hamano <gitster@pobox.com>2012-03-10 13:25:41 -0800
commit3e9c6a08c8a99349a2969f5e2c37b77a6bac9b8c (patch)
tree141d90002218071b769f7d04b19605f18d7e9ab8 /perl
parent0dbe6592ccbd1a394a69a52074e3729d546fe952 (diff)
downloadgit-3e9c6a08c8a99349a2969f5e2c37b77a6bac9b8c.tar.gz
git-3e9c6a08c8a99349a2969f5e2c37b77a6bac9b8c.tar.xz
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>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git/I18N.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 07597dcb9..40dd89719 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;