Skip Menu |

This queue is for tickets about the Exporter-Renaming CPAN distribution.

Report information
The Basics
Id: 56367
Status: resolved
Priority: 0/
Queue: Exporter-Renaming

People
Owner: ANNO [...] cpan.org
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: renaming on export_to_import() too
Date: Thu, 08 Apr 2010 07:12:41 +1000
To: bug-Exporter-Renaming [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Exporter::Renaming might subvert export_to_import() to work with modules which use that in their own import(), per the Exporter pod under "Exporting without using Exporter's import method". For example the benchmark.pl program below gets an error "Renaming" is not exported by the Benchmark module "ARRAY(0x9bf1590)" is not exported by the Benchmark module Can't continue after import errors at /usr/share/perl/5.10/Benchmark.pm line 467 BEGIN failed--compilation aborted at benchmark.pl line 4. That Benchmark.pm seems fairly typical in that it peels off args it understands then passes the rest to Exporter. I expect modules which are too smart in their import() still won't work, but various plainish uses of export_to_import() would be likely.
use strict; use warnings; use Exporter::Renaming; use Benchmark Renaming => [ timethis => 'howfast' ]; howfast (2, sub { sleep 1 });
Subject: Re: [rt.cpan.org #56367] renaming on export_to_import() too
Date: Sun, 18 Apr 2010 17:33:37 +0200
To: bug-Exporter-Renaming [...] rt.cpan.org
From: Anno Siegel <anno5 [...] me.com>
Kevin, thanks for the report. Show quoted text
> Exporter::Renaming might subvert export_to_import() to work with modules
That would be export_to_level(), right? I'll see what I can do to fix that behavior. Regards, Anno On 07.04.2010, at 23:13, Kevin Ryde via RT wrote: Show quoted text
> Wed Apr 07 17:13:40 2010: Request 56367 was acted upon. > Transaction: Ticket created by user42@zip.com.au > Queue: Exporter-Renaming > Subject: renaming on export_to_import() too > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56367 > > > > Exporter::Renaming might subvert export_to_import() to work with modules > which use that in their own import(), per the Exporter pod under > "Exporting without using Exporter's import method". For example the > benchmark.pl program below gets an error > > "Renaming" is not exported by the Benchmark module > "ARRAY(0x9bf1590)" is not exported by the Benchmark module > Can't continue after import errors at /usr/share/perl/5.10/Benchmark.pm line 467 > BEGIN failed--compilation aborted at benchmark.pl line 4. > > That Benchmark.pm seems fairly typical in that it peels off args it > understands then passes the rest to Exporter. > > I expect modules which are too smart in their import() still won't work, > but various plainish uses of export_to_import() would be likely. > > > use strict; > use warnings; > use Exporter::Renaming; > use Benchmark Renaming => [ timethis => 'howfast' ]; > > howfast (2, sub { sleep 1 }); >
Should be resolved in Exporter::Renaming 1.19 (just released)