summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0dbe659)
raw | patch | inline | side by side (parent: 0dbe659)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 10 Mar 2012 12:29:34 +0000 (12:29 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 10 Mar 2012 21:25:41 +0000 (13:25 -0800) |
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>
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>
perl/Git/I18N.pm | patch | blob | history |
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 07597dcb93a772caf7b676722c99d330ae947c47..40dd8971912d6b387bde7c9bb04cc6896521acec 100644 (file)
--- a/perl/Git/I18N.pm
+++ b/perl/Git/I18N.pm
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;