# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #128090]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128090 >


Currently, there seems to be no easy way to import only specific symbols from a 
module *at compile time*.

For example, if I want to use a module that exports a whole ton of functions 
but I only one just one, I have to write something complicated like this:

need Test;
my &is := &Test::EXPORT::DEFAULT::is;

This difficulty will result in many programmers trashing their namespaces out 
of convenience, resulting in hard-to-find bugs, especially when newer version 
of `use`d module introduces new subs.

I propose we create another reserved import tag :SYM that will take a list of 
SYMbols we want to import, eg:

use Test :SYM<&is &ok>;

Although I'm ignorant of the implementation of the :ALL tag, I'd think 
implementing :SYM would be similar (you'd just grep for wanted symbols).

Relevant IRC conversation: http://irclog.perlgeek.de/perl6/2016-05-07#i_12446098

Reply via email to