The problem is that it is very hard to do on the importing side. Once a sub is entered into your namespace it is hard to undefine it. To make it go away you have to delete the entire stash slot and put back the stuff you do not want to get rid of. Also the rename functionality is usually for cases where there is a conflict, so if you import both and rename after you have to be careful of operation order. That said I did write this just last night: https://metacpan.org/pod/release/EXODIST/Import-Into-As-0.000002/lib/Import/Into/As.pm Take a look at the code to see how awful it actually is. On the other hand doing it as an argument to import() provided by exporters is very simple. -Chad On Thu, Dec 17, 2015 at 7:50 PM, 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. > 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