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

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

Thread Next
From:
Chad Granum
Date:
December 17, 2015 20:52
Subject:
Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
CAJFr3kuYH2YWSGj2RkkCDuAzvzWDxK-fJa3g+6BKizYsh4cikA@mail.gmail.com
Several modern export tools such as Sub::Exporter and Exporter::Declare
make it possible to rename subs that you import. They tend to use a
consistent syntax:

use Foo 'export_name' => {-as => 'new_name'};


As of yet Exporter.pm has no such capability.

1) Would anyone be opposed to having this functionality added? (and why?)
2) Does anyone oppose keeping the above syntax since it is consistent with
everything else?
3) Are there any good technical reasons not to do this?

Assuming there are no objections to the idea I would like to write a patch
(unless someone else wants to do it).

-Chad

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