develooper Front page | perl.perl5.porters | Postings from December 2015

Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
December 19, 2015 04:52
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
20151219045222.GC35482@plasmasturm.org
* David Golden <xdg@xdg.me> [2015-12-19 05:00]:
> I agree about the Exporter::Rename proposal dealing with this, too, as
> it makes X opt-in, except at that point you're still adding a module
> to core that people have to use to benefit. Why not add Exporter::Tiny
> (or alternatives) and get all the extra features instead of Exporter
> plus a tiny bit of sugar?

For the reason I mentioned: switching exporters is a breaking API change
if you expose your chosen exporter’s import() directly (as most modules
do). Modules that already use Exporter can never offer renaming to their
users unless Exporter itself supports it.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About