Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 23 lines (16 sloc) 0.612 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use v6;
use Test;

# L<S11/"Modules"/"There are two basic declaration syntaxes:">

plan 7;

is($?MODULE, 'Main', '$?MODULE for main module');

module Foo {
    is($?PACKAGE, 'Foo', '$?PACKAGE for "module Foo {}"');
    is($?CLASS, 'Main', '$?CLASS unchanged for "module Foo {}"');
    is($?MODULE, 'Foo', '$?MODULE for "module Foo {}"');

    module Bar {
        is($?PACKAGE, 'Foo::Bar', '$?PACKAGE for "module Foo::Bar {}"');
        is($?CLASS, 'Main', '$?CLASS unchanged for "module Foo::Bar {}"');
        is($?MODULE, 'Foo::Bar', '$?MODULE for "module Foo::Bar {}"');
    }
}

# vim: ft=perl6
Something went wrong with that request. Please try again.