Aaron Sherman wrote:

At the end of A12, "Exportation" covered the idea that you will now say:

sub foo() is export {...}

Rather than the P5:

        @EXPORT=qw(foo);
        sub foo;

Which is fine, except that in P5 we could say:

        use Foo qw(foo);
        @EXPORT=qw(foo);

Now, I know that the Apoc on modules has not been written, and by that
time Larry will have thought of this, but I thought I'd point out that
some mechanism will have to exist in modules to indicate not only that
they acquire certain subroutines, variables, etc. of other modules, but
that they re-export them as their own.

My proposal for that issue is just:


module Bar;

use Foo «foo»;

sub foo is export {...}

This works perfectly in Perl 5 under the Perl6::Export module (now on the CPAN):

        package Bar;
        use Perl6::Export;

use Foo qw(foo);

sub foo is export;


Damian

Reply via email to