rjbs/sub-exporter — pull request #5 by damil (2012-10-20 01:20:24+00:00)
Title: partial support for bang-names

Le 17.10.2012 05:19, Ricardo Signes via RT a écrit :
>
>
> On 2012-10-16 23:15:48, DAMI wrote:
>> Sub::Exporter lacks the "negative" feature of Exporter :
>>
>> use Some;:Module qw/:all !foo/;
>
> Because each non-reference entry in the args to ->import is treated atomically, these semantics
> can't be quite supported.
>
> More plausible would be:
>
> use Some::Module ':all' => { -exclude => 'foo' };
>
> ...but that won't get you what you want, which is full back compat. On that front, there are a
> number of other features missing as well. Sub::Exporter is not a drop-in.
>
> What you *could* do, however, is write a collector for INIT that would pick an alternate installer,
> detect the case of "group name followed by bang-name" and then mark those names for non-
> installation.
>
> It should actually be pretty simple, once you see how the pieces fit together.
>

Please find a proposal to implement support for bang-names directly in _do_import; that's the place where we have a global view on the export list, so it seems easier to do it there.