Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion A12: Exporation
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Damian Conway  
View profile  
 More options Apr 23 2004, 7:52 pm
Newsgroups: perl.perl6.language
From: dam...@conway.org (Damian Conway)
Date: Sat, 24 Apr 2004 09:52:12 +1000
Local: Fri, Apr 23 2004 7:52 pm
Subject: Re: A12: Exporation

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  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.