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:
Zefram
Date:
December 18, 2015 03:50
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
20151218035046.GI7818@fysh.org
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.
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.

-zefram

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