From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Tom G. Christensen" <tgc@statsbiblioteket.dk>,
"Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 1/2] Git::I18N: compatibility with perl <5.8.3
Date: Sat, 10 Mar 2012 12:29:34 +0000 [thread overview]
Message-ID: <1331382575-16936-2-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1331382575-16936-1-git-send-email-avarab@gmail.com>
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>
---
perl/Git/I18N.pm | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 07597dc..40dd897 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;
--
1.7.9
next prev parent reply other threads:[~2012-03-10 12:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 13:11 I18N.pm is incompatible with perl < 5.8.3 Tom G. Christensen
2012-02-02 16:48 ` Ævar Arnfjörð Bjarmason
2012-02-02 21:23 ` Tom G. Christensen
2012-03-07 12:56 ` Tom G. Christensen
2012-03-07 20:53 ` Ævar Arnfjörð Bjarmason
2012-03-10 12:29 ` [PATCH 0/2] Minor fixes for Perl + Git::I18N Ævar Arnfjörð Bjarmason
2012-03-10 12:29 ` Ævar Arnfjörð Bjarmason [this message]
2012-03-10 12:29 ` [PATCH 2/2] perl/Makefile: install Git::I18N under NO_PERL_MAKEMAKER Ævar Arnfjörð Bjarmason
2012-03-10 21:38 ` Junio C Hamano
2012-03-11 19:27 ` Ævar Arnfjörð Bjarmason
2012-03-16 16:14 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331382575-16936-2-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tgc@statsbiblioteket.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).