From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Tom G. Christensen" <tgc@statsbiblioteket.dk>
Cc: git@vger.kernel.org
Subject: Re: I18N.pm is incompatible with perl < 5.8.3
Date: Thu, 2 Feb 2012 17:48:15 +0100 [thread overview]
Message-ID: <CACBZZX5YuN8vpmTiP_38Aa=c3KDqEHCKBX3DE2YKkeMCdR4GBg@mail.gmail.com> (raw)
In-Reply-To: <4F2A8B78.6090902@statsbiblioteket.dk>
On Thu, Feb 2, 2012 at 14:11, Tom G. Christensen
<tgc@statsbiblioteket.dk> wrote:
> Hello,
>
Thanks Tom, I'll submit a patch for that. Does this work, i.e. does
5.8.3 need *{import} = instead of *import = ?
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 07597dc..5bcfed5 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 supporting this invocation was released with
+ # 5.8.3
+ Exporter->import('import');
+ }
+}
our @EXPORT = qw(__);
our @EXPORT_OK = @EXPORT;
But actually it might be better to check $Exporter::VERSION
next prev parent reply other threads:[~2012-02-02 16:48 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 [this message]
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 ` [PATCH 1/2] Git::I18N: compatibility with perl <5.8.3 Ævar Arnfjörð Bjarmason
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='CACBZZX5YuN8vpmTiP_38Aa=c3KDqEHCKBX3DE2YKkeMCdR4GBg@mail.gmail.com' \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--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).