develooper Front page | perl.perl5.porters | Postings from January 2016

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

Thread Next
From:
Chad Granum
Date:
January 24, 2016 06:12
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
CAJFr3ks=Sfar+hjUaC4y_h9X5AoLBuqCAFpeo7A7nY1yzyuSKQ@mail.gmail.com
Related:

http://blogs.perl.org/users/chad_exodist_granum/2016/01/the-problem-with-exporters-meet-importer.html

This blog post was spawned by this thread, and some very good thing people
introduced into the discussion.

Part 1 is up on cpan (Importer.pm).

I do not have a formal patch made from Part2, but the commit is on my
github clone of the perl repo. I am mainly posting this here to gauge
opinion and seek feedback.

-Chad

On Thu, Dec 17, 2015 at 12:51 PM, Chad Granum <exodist7@gmail.com> wrote:

> 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