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:
demerphq
Date:
December 18, 2015 10:49
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
CANgJU+Wf9EUex7VBss6i4b5xNdtP8rNjUWCDv_7KdAnT+uG-+Q@mail.gmail.com
On 18 December 2015 at 04:50, Zefram <zefram@fysh.org> wrote:
> Chad Granum wrote:
>>Several modern export tools such as Sub::Exporter and Exporter::Declare
>>make it possible to rename subs that you import.
>
> Appealing though such features are, the exporting side is the wrong place
> to do it, precisely because it would need to go into every exporter.

I dont think this argument holds water in face of the number of
Exporter like modules that exist that do this. Clearly there is a very
strong need in the community for this feature.

At work, I am often frustrated by an Exporter replacement that we use
at least partly because Exporter does not support this feature.

> Better to keep the exporter's obligations minimal, and address this
> on the importing side.  The facility can be written once to be applied
> regardless of exporter type, and it only need be invoked by importing
> modules that actually want to use the facility.

I think you need to write this thing, and then show us what it looks
like. Because I dont even get what you mean by this facility. How is
such a facility any different from what the OP wants to add to
Exporter?

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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