Hey Fernando,

This is not yet implemented in rakudo. I included a way of doing this in
CompUnit::Util <https://github.com/LLFourn/p6-CompUnit-Util#re-export>. I'm
not sure when/if :EXPORT will be implemented (I actually don't think it's a
good idea).

I've just realised that there is another solution though. You can do this:

use FirstModule;
my package EXPORT::DEFAULT { } # initialise the export namespace
BEGIN for <&foo &bar &baz> { # iterate over the things you want to
re-export by default
        EXPORT::DEFAULT::{$_} = ::($_)

This actually might be worth adding to the docs.


On Sat, Dec 31, 2016 at 8:43 AM Fernando Santagata <
nando.santag...@gmail.com> wrote:

> Hello,
> I have a module that defines some constants and another one that use the
> first module.
> I wish to re-export those constants.
> I read here:
> http://design.perl6.org/S11.html
> that this:
> use FirstModule :EXPORT;
> should re-export the imported symbols, but it throws an error (no such tag
> 'EXPORT').
> Any idea?
> --
> Fernando Santagata

Reply via email to