Camelia
Prev: Modules in Perl 6

Exporting subs from modules

Exporting from modules is not yet implemented in Rakudo.
examples/modules/A.pm
module A {
    sub foo() is export {
        say 'in foo';
    }
}
examples/modules/export.p6
use v6;

BEGIN {
	push @*INC, 'examples/modules';
}

use A;

foo();


Prev: Modules in Perl 6

Table of Contents

Comments

In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: