>Trade a bad idiom for a good one
>
>Modified: Module-Build/trunk/t/lib/DistGen.pm
>======================================================================
>======== --- Module-Build/trunk/t/lib/DistGen.pm (original)
>+++ Module-Build/trunk/t/lib/DistGen.pm Mon Jan 28 15:21:37 2008
>@@ -27,8 +27,7 @@
> }
> }
> BEGIN {
>- require Exporter;
>- *{import} = \&Exporter::import;
>+ use Exporter 'import';
Looks like we need to roll this back to be compatible with 5.6.2. Are
we trying to be compatible with 5.6.2?
--Eric
--
"Matter will be damaged in direct proportion to its value."
--Murphy's Constant
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
Yeah, I guess we are. Thanks for the spot.
-Ken
use Exporter 'import';
has been introduced in version 5.57 of Exporter, released with perl
5.8.3. Thus,
BEGIN {
require Exporter;
*{import} = \&Exporter::import;
}
would be justifiable if M::B does not intend to force an Exporter
upgrade (since it has dual life now). From the list of changes of
lib/Exporter.pm, including:
(from http://public.activestate.com/cgi-bin/perlbrowse/l/lib/Exporter.pm)
21798 on 2003/11/28 by rgs@rgs-home
Implement C<use Exporter 'import'> :
Subject: Re: [PATCH] Exporter-related PODs
From: Fergal Daly <***@esatclear.ie>
Date: Mon, 10 Nov 2003 00:08:52 +0000
Message-Id: <200311100008...@esatclear.ie>
(tweaked, so the imported import() doesn't spit out warnings)
it seems that the ugly idiom should (hopefully) work alright for older
Exporter's.
Regards,
Adriano Ferreira