Raku Cases › Modules

Modules

use, need, require, exports and imports, and how a distribution is found.

141 rules from 97 tests. 78 of those tests are confirmed on both engines: Raku++ and Rakudo 2026.11 both pass, or Raku++ gives Rakudo's answer on every probe of a family. The verdict is the test's, not each rule's. How to read a case.

check-unexportedRaku++ matches Rakudo on 18 of 39 probes2026-11-28 · 04a1722e · #282
  1. 2

    The compile-time undeclared-name check knows exactly what a use brings into scope, for every kind of symbol and export tag.

subset-importedRaku++ matches Rakudo on 24 of 36 probes2026-11-28 · 04a1722e · #278
  1. 2

    An imported short type name means the same type in every declarator.

6e-pm-extensionRaku++ passesRakudo cannot run it2026-08-19 · 9e4eb1e9
  1. 1

    From 6.e .pm is not a module file extension: a 6.e program cannot load a module from a .pm file, while a 6.d program still can.

battery-proto-new-x-stash-write-positionRaku++ passesRakudo passes2026-10-10 · 0c3540cf
  1. 2

    A my class X::Encode::Unknown declared inside unit module Encode lives in the GLOBAL X package's stash, so X::Encode::Unknown names it from outside, while its .^name stays the long, module-qualified one.

More from this test: I/O & processes (1), Classes, roles & the MOP (1).

battery-regressions-v5Raku++ passesRakudo passes2026-09-29 · 78d68426
  1. 6

    A module loaded inside a block still sees the modules it loads itself. inferred

  2. 7

    An export tag built by hand, package EXPORT::tag { our &f = … }, is imported by use with that tag.

More from this test: Hashes & sets (1), I/O & processes (1), Classes, roles & the MOP (1), Operators (1), Regexes & grammars (1), Signatures & dispatch (2).

block-import-last-winsRaku++ passesRakudo passes2026-11-08 · b8d8799d
  1. 1

    Two imports of one routine name in a block or a routine keep the last, as in the mainline.

    { use Other; use Other2; say run-word("a") } calls Other2's

block-use-module-sees-its-depsRaku++ passesRakudo passes2026-11-16 · 5f000351
  1. 1

    A module used in a bare block keeps seeing the packages it loaded itself after that block has ended.

    my $S; { use ZB; $S = ZB::S }; $S.new.m works when ZB's method names ZA::Z from its own use ZA

  2. 2

    A package name brought in by a use inside a bare block is not visible to the program's own code after the block.

    the program's own ZB::S after { use ZB; … } is refused

bson-simple-and-hash-agnosticRaku++ passesRakudo passes2026-08-31 · 2d04edb3
  1. 1

    use lib takes effect while the file is being parsed, so an operator declared by a module found through it is known to the rest of the file.

More from this test: Containers & assignment (4), Dates & times (1), Hashes & sets (1), Classes, roles & the MOP (2), Operators (1), Signatures & dispatch (2), Stringification (1), Strings & Unicode (1), Types & coercion (1).

check-only-unexported-module-variableRaku++ passesRakudo passes2026-11-25 · 72e3db13 · #282
  1. 1

    A variable that a used module declares with our but does not export is not in the importer's scope: naming it is X::Undeclared at compile time.

    use Z; say $Q, with Z's plain our $Q, is refused by -c

    Also held by check-unexported.

  2. 2

    A module with no unit package puts its our names in GLOBAL, where the importer sees them.

cro-live-clusterRaku++ passesRakudo passes2026-07-23 · 3c1b7a9e
  1. 1

    An is export sub inside a braced module is exported even when its name collides with a built-in routine such as get or put.

More from this test: Containers & assignment (1), Classes, roles & the MOP (2), Scoping & phasers (1), Signatures & dispatch (1), Syntax & parsing (2).

dependency-specification-names-its-typeRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    CompUnit::DependencySpecification.new(:short-name<Foo>) answers an object that smartmatches CompUnit::DependencySpecification.

dynamic-var-caller-chainRaku++ passesRakudo does not pass2026-08-25 · 6879a71b
  1. 5

    use Foo:if(COND) skips the load when COND is false and loads the module and runs its EXPORT when true; a repeated bare use replays EXPORT.

More from this test: Everything else (1), Scoping & phasers (3).

ecosweep-1000-batchRaku++ passesRakudo cannot run it2026-09-09 · 91831a84
  1. 2

    A module that fails to parse raises a catchable run-time exception under require, whereas under use it aborts compilation.

More from this test: I/O & processes (1).

ecosweep-2026-09Raku++ passesRakudo passes2026-09-05 · ebe0953e
  1. 3

    use lib takes a comma-separated list of paths and adds every one of them.

  2. 4

    our $x is export in a module is one container, shared between the module and the importer.

  3. 5

    An import inside a block is lexical to that block and shadows an outer routine of the same name there.

More from this test: I/O & processes (2), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (2), Signatures & dispatch (1), Types & coercion (1).

empty-import-list-imports-nothingRaku++ not runRakudo does not pass2026-09-15 · 9ad1caac
  1. 1

    use Mod () and need Mod load a module and import nothing.

    after use P5index (), index("foobar","zzz") is the built-in and answers Nil

evalfileRaku++ passesRakudo cannot run it2026-08-26 · 1c70fae2 · #33
  1. 1

    EVALFILE($path) reads the file first, so a missing file dies before the language is looked at, evaluates the code in the caller's lexical scope, and passes every adverb through to EVAL.

evalfile-from-a-module-fileRaku++ passesRakudo passes2026-10-14 · 5760e1b6
  1. 1

    $?FILE in a file run by EVALFILE from a routine in a module names the EVALFILE'd file's own path, not the module's.

exe-declarator-podRaku++ passesRakudo passes2026-10-18 · a8cede75
  1. 2

    Declarator pod written in a module file reaches .WHY of the module's declarations.

exe-imported-mainRaku++ passesRakudo passes2026-09-30 · 3ce93e4d · #112
  1. 2

    A multi sub MAIN(...) is export imported with use runs as the program's MAIN.

exe-routine-scope-shapesRaku++ passesRakudo passes2026-11-11 · 539110b8
  1. 4

    A use written inside a sub imports into that sub's body.

More from this test: Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (1).

exe-use-import-formsRaku++ passesRakudo passes2026-11-11 · 7b420787
  1. 2

    use M <a> passes its import list as arguments to M's sub EXPORT.

  2. 3

    need M and use M () import nothing.

export-failure-fails-the-useRaku++ passesRakudo passes2026-09-09 · 211c5cab
  1. 1

    A die inside a module's sub EXPORT aborts the compilation of a use or need of that module, and the program exits with status 1.

    use M <typo> where EXPORT rejects the argument exits 1

More from this test: divergences (1).

export-hand-built-stashRaku++ passesRakudo passes2026-10-01 · bccdf1b1
  1. 1

    A module that fills its EXPORT::DEFAULT package by hand exports those names to a use.

    my package EXPORT::DEFAULT { }; BEGIN for <&config &bash> { EXPORT::DEFAULT::{$_} = ::($_) } makes bash(…) callable after use

  2. 2

    A plain use imports from the EXPORT::DEFAULT and EXPORT::MANDATORY packages, a named tag from that tag's package and MANDATORY, and :ALL from the EXPORT::ALL package only.

export-sub-scopeRaku++ passesRakudo passes2026-10-10 · d948832f
  1. 1

    A sub EXPORT written after unit module Foo is Foo::EXPORT, a sub of the package, and is not called on use; only the compunit's own EXPORT, written before the unit declaration or in a file with none, is the export protocol.

export-tag-selectiveRaku++ passesRakudo passes2026-09-09 · 07561022
  1. 2

    A name exported under several tags, is export(:DEFAULT, :beta), is imported when any one of them is requested.

    use Mod :beta imports a name declared is export(:DEFAULT, :beta)

export-tags-and-package-stashesRaku++ passesRakudo passes2026-10-27 · aff5032b · #202
  1. 1

    Every exported symbol (routine, variable, constant, class, role, enum and its members, subset) is in the package of each of its tags under EXPORT (DEFAULT when it names none) and in ALL, and an exported variable's entry is its container.

    a symbol marked is export(:tg) is listed under EXPORT::tg, not under DEFAULT

  2. 2

    An exported symbol is installed in the EXPORT of every package it is declared within, including a package or class declared in the program and an enclosing package.

    module Outer { module Inner { sub i is export } } gives Outer an EXPORT too

  3. 3

    A package's Stash lists the subsets and modules declared in it.

  4. 5

    An import honours export tags for every kind of symbol: a plain use brings in only DEFAULT symbols, use M :tag only that tag's, need M none, and a constant or enum a module does not export never reaches its importer.

    a plain use does not bring in our $tv is export(:vt) or constant TK is export(:ct)

More from this test: Syntax & parsing (1).

failed-use-fails-againRaku++ passesRakudo passes2026-11-09 · 7e9c0387
  1. 1

    A use of a module that failed to load fails again on every later attempt with X::CompUnit::UnsatisfiedDependency.

    try EVAL 'use No::Such'; EVAL 'use No::Such; say "alive"' dies on the second use too

file-magical-in-moduleRaku++ passesRakudo passes2026-09-06 · a25e34a1
  1. 1

    $?FILE is the file the code was written in: inside a module's top level and subs it names the module's file, and a block written in the program still names the program when a module's sub calls it.

  2. 2

    Inside a module $?FILE is the absolute source path followed by the name the module was loaded as, in parentheses.

    …/QFile.rakumod (QFile)

  3. 3

    $?FILE is -e for code given with -e, without a directory prefix, and - for a program read from standard input. inferred

filesystem-repo-resolves-to-a-compunitRaku++ passesRakudo passes2026-09-15 · 43815963
  1. 1

    CompUnit::Repository::FileSystem.resolve($spec) answers a CompUnit for a module the tree holds and Nil for one it does not.

  2. 2

    A CompUnit::Repository::FileSystem on a distribution root reads its modules through the META6 provides, and answers .prefix.

grand-review-c4b-modules-seqRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 3

    use Mod :ALL imports every exported name, tagged or not.

  2. 4

    The repository spec -I file#/dir names the directory /dir as a module search path.

More from this test: Lists & laziness (1), Scoping & phasers (1).

implied-package-of-qualified-nameRaku++ passesRakudo passes2026-11-03 · 3072c3a5
  1. 1

    class A::B and use A::B declare the package A as well, so a bare A resolves and A.WHO<B> reaches the inner package.

    after use Outer::Inner, Outer.WHO<Inner> reaches the module and ::('Outer') is no Failure

  2. 2

    A later class A or module A replaces the package stub that class A::B implied.

import-is-lexicalRaku++ passesRakudo passes2026-09-28 · 2cc896bd
  1. 1

    An import is lexical: after { use Foo } the module's exported foo() is not callable outside the block.

  2. 2

    A dependency's exports do not reach a program that only uses the module depending on it, and a module's unexported routines are not visible to the program.

  3. 3

    An EVAL parses only the operators imported into the scope it runs in. inferred

  4. 4

    A package-less module's our sub and an exported code variable are installed in GLOBAL.

  5. 5

    A require stubs its package at compile time.

  6. 6

    A require "File" inside a method keeps what the file declares lexical to that method.

import-no-such-tagRaku++ passesRakudo passes2026-09-28 · 2cc896bd
  1. 1

    use Mod :tag for a tag the module exports nothing under dies with X::Import::NoSuchTag, on the first use and on a later one when the module is already loaded.

  2. 2

    An export tag that only a variable carries is still a valid tag for use, and :ALL always is.

  3. 3

    A require list names symbols rather than tags, and a missing one throws X::Import::MissingSymbols.

import-over-local-routineRaku++ passesRakudo passes2026-11-08 · eb574770 · #230
  1. 2

    An imported routine and a local one of the same name do not clash when both are multis (they merge), when a proto is written before the import (it takes the imported candidates), when the import is a stub the local sub completes, when the export was not asked for, with need or use M (), or when the use is in another scope.

  2. 4

    Two imports of one routine name in the mainline keep the last.

More from this test: Compile-time errors (2).

import-runs-module-body-onceRaku++ passesRakudo passes2026-10-12 · 5c4c71bc · #158
  1. 1

    import M does not run the body of an already built module M {…} again.

import-statement-tagsRaku++ passesRakudo passes2026-09-16 · b22d82fc
  1. 1

    import Mod :tag after need Mod imports that tag's export set.

    need Math::Trig; import Math::Trig :radial; brings in the :radial subs

imported-operator-spellingsRaku++ passesRakudo passes2026-10-29 · 25781bde · #60
  1. 1

    An operator imported from a module lexes whole in the importing file, as the file's own declaration of it would.

    an imported (<&) in 1 (<&) 2, (+&), ⨁⨁, √√4 and 1 +++ 2 are each one operator, and an imported circumfix [[ ]] is not a plain array

installed-newest-version-winsRaku++ passesRakudo passes2026-08-28 · 877b30fb
  1. 1

    When several versions of one distribution are installed, use loads the newest version that satisfies the use statement's constraint.

    with 0.1.7 and 0.1.8 installed, a bare use loads 0.1.8

  2. 2

    Installed distribution versions are compared numerically segment by segment when use picks the newest.

    0.0.10 is newer than 0.0.9

invocant-smiley-and-role-multisRaku++ passesRakudo does not pass2026-07-30 · cb88278b
  1. 1

    In a unit role file the use statements take effect before parent and role resolution, so also does X finds a role defined in another file.

More from this test: Classes, roles & the MOP (2), Signatures & dispatch (4), Syntax & parsing (1).

issue-116-module-type-short-namesRaku++ passesRakudo passes2026-10-02 · 76f2a994 · #116
  1. 1

    A module's unexported type is known only by its qualified name and does not replace a same-named type another module exported.

    role Node inside unit module YAMLish is YAMLish::Node and nothing else

More from this test: Regexes & grammars (1), Types & coercion (1).

issue-170-exported-our-one-containerRaku++ passesRakudo passes2026-10-13 · e0fd3dbe · #170
  1. 1

    A module's our $X is export is one container: the module's own code, the importer's bare $X and the qualified $M::X all see a write made through any of them, with or without an initializer.

    set-x(42) shows through $M::X, and $M::X = 7 through get-x()

issue-202-stash-our-variable-lookupRaku++ passesRakudo passes2026-10-27 · 5d31d4a2 · #202
  1. 2

    Only a module that exports something with is export has an EXPORT package in its Stash.

    Circle::.keys is ($pi) for a module that exports nothing

More from this test: Scoping & phasers (1).

issue-211-trait-is-candidatesRaku++ passesRakudo passes2026-10-28 · 0e44c5a6 · #211
  1. 2

    A multi that a module's EXPORT sub hands out ('&trait_mod:<is>' => …) joins the importer's own multi group instead of replacing it.

    a module that declares is zapped and then says use NativeLibs keeps its trait

More from this test: Signatures & dispatch (1).

issue35-zef-after-installRaku++ passesRakudo cannot run it2026-10-07 · 808e24eb · #35
  1. 4

    CompUnit::Repository::Staging exists: a distribution is staged in it and .deploy moves it into the target repository.

More from this test: Containers & assignment (1), Hashes & sets (1), I/O & processes (1), Lists & laziness (1), Types & coercion (1).

issue37-fez-zef-installRaku++ passesRakudo cannot run it2026-08-27 · c63eb77a · #37
  1. 2

    use Module:ver("*") accepts any version of the module.

    use Zef::Distribution:ver("*")

  2. 3

    A non-literal expression in use Module:ver(EXPR) is not compared as source text against the candidates' versions. inferred

    use Zef:ver($?DISTRIBUTION.meta<version> // '*') loads Zef

  3. 4

    $?DISTRIBUTION in a module loaded through -I is an object whose .meta is a hash.

More from this test: Containers & assignment (1), Regexes & grammars (1), Syntax & parsing (2), Types & coercion (1).

langrev-travels-with-codeRaku++ passesRakudo cannot run it2026-08-19 · ea807cac
  1. 1

    A sub compiled under use v6.e.PREVIEW keeps 6.e semantics when a 6.d program calls it.

More from this test: Lists & laziness (1), divergences (1).

metamodel-mixin-and-trait-importsRaku++ passesRakudo passes2026-09-15 · c7787832 · #77
  1. 4

    Importing a module does not stop user-defined trait_mod:<is> traits already in scope from being applied.

    after use NativeLibs, a user-defined is trait still applies

More from this test: Classes, roles & the MOP (4), Signatures & dispatch (1).

module-enum-is-ourRaku++ passesRakudo passes2026-10-30 · 5801c286
  1. 1

    An enum is our: its type and its members under their qualified names are reachable from the program that uses the module.

    enum HTTP::HPACK::Indexing <Indexed …> in a module makes HTTP::HPACK::Indexing::Indexed resolve in the program

  2. 2

    enum G::Mode inside unit module G is G's own Mode, named G::Mode.

  3. 3

    The bare member names of an enum a module declares outside any package, named or anonymous, reach the using program, whereas inside unit module they do not, and a my enum publishes neither its type nor its members.

module-extensions-exclude-rakuRaku++ passesRakudo passes2026-09-16 · 32ca0f66
  1. 1

    A module name resolves to a .rakumod, .pm6 or (before 6.e) .pm file and never to a .raku file, even with an explicit -I.

  2. 2

    A module kept in a .raku file is loadable when the distribution's META6 provides names that path, which is tried before any name-derived candidate.

More from this test: divergences (1).

module-name-caseRaku++ passesRakudo passes2026-08-12 · 3e238862
  1. 1

    Module names are case-sensitive: use Config does not load a file named config.raku, even on a case-insensitive filesystem.

module-name-not-taken-by-nested-typeRaku++ passesRakudo passes2026-10-30 · 480f6850
  1. 1

    A module's or package's name keeps meaning the module beside a type declared inside it whose qualified name ends with the module's name.

    with role X::ModE::B in module ModE::B, ModE::B.^name is ModE::B

module-quote-word-sub-scopeRaku++ passesRakudo passes2026-10-29 · 46c4ef60 · #194
  1. 2

    A module's own unexported sub q or sub s does not change how q{…} or s/// reads in the file that uses the module; only a sub the import brings in (is export, or through an EXPORT sub) shadows the quote word.

More from this test: Syntax & parsing (1).

module-sees-not-the-programs-operatorsRaku++ passesRakudo passes2026-10-31 · 8a6c9d9a · #77
  1. 1

    A module does not see the operators the main program imports or declares; it sees its own imports and CORE's.

    a module's [eqv] asks CORE's eqv although the program imported a multi infix:<eqv>

module-trait-exported-from-beginRaku++ passesRakudo passes2026-10-30 · a81b6f91
  1. 1

    A routine marked is export that a module declares in a nested block, such as a BEGIN, reaches the importer.

  2. 2

    Metamodel::ClassHOW names the setting's class even after a distribution's own Foo::Metamodel::ClassHOW is loaded, while inside a module its own nested Metamodel::Mine still answers the short name.

    when Metamodel::ClassHOW still matches a class's HOW

module-variables-stay-the-modulesRaku++ passesRakudo passes2026-10-21 · cff43a59
  1. 1

    Only the variables a module exports reach its importer under their bare names; an unexported our is reachable by its package name ($UM::v) and the importer's own our of the same name is a separate variable.

    after use UM where UM has our $v = 1, the program's own our $v is Any

  2. 2

    ::('$name') in a program does not find a private my variable of a module it loaded.

my-stash-sees-test-importsRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    What use Test imports is in the importing scope's stash, through MY::, UNIT::, LEXICAL:: and OUTER::.

    MY::.keys has &ok and MY::<&ok>:exists is True

More from this test: Scoping & phasers (1).

native-and-resourcesRaku++ passesRakudo does not pass2026-07-24 · 21e46c1a
  1. 5

    An our sub declared in an EVAL'd unit module resolves by its fully-qualified name.

More from this test: Native types & NativeCall (3).

native-lib-expression-and-resourcesRaku++ passesRakudo passes2026-07-30 · e8582ba6 · #13
  1. 2

    %?RESOURCES<libraries/x> resolves to the platform's library file name (libx.dylib, libx.so, x.dll).

More from this test: Native types & NativeCall (1).

nested-use-qualified-nameRaku++ passesRakudo passes2026-10-07 · 59a5f3e1 · #47
  1. 1

    A use inside a routine or block keeps only the top-level name it loads lexical while the package's contents merge into GLOBAL, so G::Path resolves wherever G is visible some other way and stays unknown when the nested load alone brought G.

package-gapsRaku++ passesRakudo passes2026-11-08 · 85a90672
  1. 1

    GLOBAL::.keys lists every package-scoped name.

    class A::B gives it A

More from this test: Compile-time errors (1), Classes, roles & the MOP (1).

package-relative-namesRaku++ passesRakudo passes2026-07-23 · 0e4912e1
  1. 1

    A class declared with a qualified name such as URI::Path can be found by its last name component Path when that short name is otherwise free, but a user type never shadows a built-in type of the same short name. inferred

    X::Roast::Channel does not hijack Channel

  2. 3

    A use statement inside a class body loads the module at the point of declaration.

More from this test: Classes, roles & the MOP (2), Operators (1), Regexes & grammars (1).

package-symbols-and-package-howRaku++ passesRakudo passes2026-07-29 · 0d9102b0
  1. 1

    Foo::<bar> is a slot in package Foo's symbol table and can be assigned.

    EXPORTHOW::<class> = TestHOW installs the entry

More from this test: Classes, roles & the MOP (1).

package-then-role-coexistRaku++ passesRakudo passes2026-07-23 · 14f65181
  1. 1

    A bare package Foo { } block may be followed by a class, role or grammar of the same name, which refines it.

    package Foo { our sub … } then role Foo { … } compiles

More from this test: Compile-time errors (2).

parse-unicode-and-shapesRaku++ passesRakudo passes2026-09-12 · 39b5af4c
  1. 3

    require with a symbolic name takes an import list: require ::('Name') <&sym>.

    try require ::('Data::Dump::Tree') <&ddt> parses

More from this test: Signatures & dispatch (1), Syntax & parsing (4).

pdf-family-2026-09Raku++ passesRakudo passes2026-09-14 · a3586267
  1. 39

    A second use Mod :&name widens what an earlier, narrower use of the same module imported.

More from this test: Containers & assignment (8), Exceptions & control flow (1), I/O & processes (1), Lists & laziness (1), Numerics (1), Classes, roles & the MOP (14), Operators (1), Regexes & grammars (3), Scoping & phasers (4), Signatures & dispatch (9), Syntax & parsing (11), Types & coercion (3).

pod-blocks-and-textRaku++ passesRakudo passes2026-09-16 · a4289568
  1. 5

    Pod::To::Text is a core module: use Pod::To::Text provides pod2text.

More from this test: Everything else (4).

precomp-langrevRaku++ passesRakudo passes2026-09-11 · d0cf61dd
  1. 1

    A module's own language revision pragma (use v6.e.PREVIEW, use v6.*) governs that module's code whatever revision the importer uses.

private-call-and-import-shadowingRaku++ passesRakudo passes2026-08-27 · fac8387c
  1. 2

    A routine the program declares is not replaced by a same-named routine of a used module that the use did not import.

  2. 3

    Importing a name and declaring a routine of the same name in one scope is a redeclaration error.

More from this test: Classes, roles & the MOP (1).

raku-version-is-main-unitsRaku++ passesRakudo passes2026-09-16 · d3e75a51
  1. 1

    $*RAKU.version is the main program's language revision, whichever compilation unit reads it.

    a module headed use v6.* loaded from a 6.d program sees $*RAKU.version as 6.d

rakudo-t-language-gaps-3Raku++ passesRakudo passes2026-10-05 · be813251
  1. 2

    our &f is export = … puts &f in EXPORT::DEFAULT.

More from this test: Compile-time errors (2), Containers & assignment (1), Lists & laziness (2), Classes, roles & the MOP (1), Operators (2), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (1), Stringification (1), Syntax & parsing (1).

require-imports-nothingRaku++ passesRakudo passes2026-11-27 · 26ec71cf · #291
  1. 1

    A bare require Foo imports nothing; only an import list (require Foo <&foo>) brings names in, and the module's EXPORT stash stays reachable.

    a module with its own sub foo may require Foo whose foo is is export without a redeclaration error

    Also held by require-imports.

require-path-loads-file-runs-mainRaku++ passesRakudo passes2026-10-27 · cb5b360a
  1. 1

    require with a file path (require "path" or require Stub:file(path)) loads that very file, compiles it as a mainline and runs its MAIN on @*ARGS, whereas a use of the same file does not run MAIN.

    require "/abs/path/Build.pm6" runs that file's sub MAIN

  2. 2

    require of an absolute path that does not exist throws.

require-symbolic-nameRaku++ passesRakudo passes2026-08-20 · e990d3db
  1. 1

    require ::($name) loads the module whose name the string spells, without first resolving it as a symbol.

    require ::('Font::Metrics::courier') loads that module

return-type-same-moduleRaku++ passesRakudo passes2026-07-29 · 51203006
  1. 1

    A sub whose return type names a class declared in the same unit module can be called from another compilation unit.

roast-3log-batch2Raku++ passesRakudo passes2026-09-28 · bda6f720
  1. 11

    A module loaded at run time (require, $*REPO.need) sees the caller's dynamic variables, and so do the modules it loads; a compile-time use does not.

More from this test: Exceptions & control flow (1), Numerics (1), Classes, roles & the MOP (6), Everything else (1), Regexes & grammars (5), Scoping & phasers (1), Syntax & parsing (1).

roast-3log-batch3Raku++ passesRakudo passes2026-09-28 · fdc70ae4
  1. 2

    Each compilation unit sees a package through what it uses itself: Pkg::.keys lists the types its own imports brought, not every Pkg::* loaded anywhere.

  2. 3

    The program's MY:: holds its own lexicals only: not a type some module needed, nor any Mod::EXPORT::….

  3. 4

    $cu.handle.globalish-package is that compilation unit's own GLOBALish.

  4. 5

    use lib "inst#$path" evaluates the string and makes that installation repository the head of $*REPO, which does Installable and Locally.

  5. 6

    An explicit installation repository installs Distribution::Hash / Distribution::Path, lists and matches candidates, needs one without merging its globals until GLOBALish.WHO.merge-symbols, and uninstalls.

  6. 7

    A FileSystem repository answers candidates from its directory tree, and a distribution's .content is a handle on the file it holds.

More from this test: Concurrency (1).

roast-sweep-runtimeRaku++ passesRakudo cannot run it2026-09-28 · 2cc896bd
  1. 2

    import takes the EXPORT tags it is asked for. inferred

  2. 9

    A my subset declared in a module stays inside that module. inferred

More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (2), Exceptions & control flow (2), Hashes & sets (4), I/O & processes (3), Lists & laziness (5), Classes, roles & the MOP (8), Operators (4), Everything else (1), Regexes & grammars (1), Scoping & phasers (14), Stringification (1), Strings & Unicode (1), Types & coercion (3).

run-adverbs-keep-undo-rule-captureRaku++ passesRakudo passes2026-07-25 · 85e74a52
  1. 4

    A failed runtime require throws an exception and emits no warning, so try require ::($m) is silent.

More from this test: I/O & processes (1), Regexes & grammars (1), Scoping & phasers (1).

slang-used-again-after-a-module-that-uses-itRaku++ passesRakudo cannot run it2026-11-02 · 42618157
  1. 1

    use Slang::X in a program arms the slang even when a module used before it had already loaded that slang.

    use Text::CSV; use Slang::Tuxic; parses the rest of the file with the slang

  2. 2

    A module's own use Slang::X does not arm the slang in the program that uses the module. inferred

stub-role-after-useRaku++ passesRakudo passes2026-07-22 · 60a51a27
  1. 1

    A stub declaration role R {...} whose name matches a module loaded with use is legal and raises no X::Package::Stubbed.

    use RoleB; role RoleB {...} compiles

tagged-code-constant-exportRaku++ passesRakudo passes2026-10-29 · 55e91563 · #60
  1. 1

    A code constant or our &var exported under a tag is imported only by that tag, as a sub is.

    constant &sp is export(:shortcuts) = &drop-spaces reaches use Mod :shortcuts, and a bare use Mod leaves it out

telemetry-moduleRaku++ passesRakudo passes2026-11-13 · fcc6d577 · rakudo#1513 · rakudo#3844 · rakudo#5144
  1. 1

    use Telemetry loads the core Telemetry module, with T<max-rss>, T{"max-rss"}, snaps, periods and the report.

test-and-nativecall-routines-need-useRaku++ passesRakudo passes2026-11-14 · 1f3377ea · rakudo#1612 · rakudo#1631 · rakudo#2191 · rakudo#3607 · rakudo#4967
  1. 1

    Test's and NativeCall's routines are undeclared without a use of their module.

    ok 1 and is-deeply … are undeclared with no use Test

  2. 2

    Code run by EVAL sees the use of its caller.

top100-chunk-c-b1-2026-09-03Raku++ passesRakudo does not pass2026-09-03 · 8ed8618a
  1. 2

    require Mod:ver(...) with :ver or :auth adverbs parses inside a block, ending at the block's }.

    lives-ok { require CSS::Grammar:ver(v0.3.3+) }, "…" parses

More from this test: Hashes & sets (1), Classes, roles & the MOP (1).

top100-chunk-export-tags-2026-09-03Raku++ passesRakudo passes2026-09-03 · 4d873a89
  1. 1

    A name declared is export(:foo) is imported only when the importer asks for that tag (use Mod :foo), while plain is export, :DEFAULT and :MANDATORY names are imported by a bare use.

    after a bare use Prompt, MY::<&prompt>:exists is False for a sub exported under a tag only

More from this test: divergences (1).

top100-four-roots-2026-09-02Raku++ passesRakudo cannot run it2026-09-02 · 3f24e005
  1. 5

    A source file loaded through CompUnit::PrecompilationRepository.try-load may not contain use lib; the load fails with a message containing 'use lib' cannot be precompiled.

More from this test: Lists & laziness (1), Native types & NativeCall (1), Operators (1), Everything else (1).

top100-roots-2026-09-02Raku++ passesRakudo does not pass2026-09-02 · 7af75847
  1. 6

    A my constant declared is export (tagged or untagged) in a unit class body is exported to the importer.

More from this test: Containers & assignment (1), Exceptions & control flow (2), Lists & laziness (1), Native types & NativeCall (3), Numerics (1), Classes, roles & the MOP (4), Regexes & grammars (3), Scoping & phasers (1), Stringification (1), Strings & Unicode (2), Syntax & parsing (3), Types & coercion (6).

unit-module-our-sub-qualifiedRaku++ passesRakudo cannot run it2026-09-24 · b1c48be0
  1. 1

    A file headed unit module Foo; publishes its our subs under the qualified name, so the program can call Foo::name() itself.

    unit module Quux; our sub deep { "d" }; say Quux::deep(); prints d

unit-stash-exists-under-import-listRaku++ passesRakudo passes2026-11-11 · 9338d1b1 · #245
  1. 1

    Inside a module's sub EXPORT, UNIT::{'&name'}:exists and UNIT::{'&name'}:p find the module's own symbols whether or not the importer passes an import list.

  2. 2

    Inside a module's sub EXPORT, UNIT::{'&EXPORT'}:exists is True. inferred

use-if-is-answered-nativelyRaku++ passesRakudo passes2026-09-14 · a81e2c44
  1. 1

    use if; loads, and use Foo:if(EXPR) skips loading Foo when EXPR is false.

use-in-routine-bodyRaku++ passesRakudo cannot run it2026-10-11 · 1099187e
  1. 1

    A use of a missing module inside a routine body is refused at compile time even when nobody calls the routine.

use-ok-adverbed-nameRaku++ passesRakudo passes2026-09-16 · f130fff1
  1. 1

    use-ok takes a module spec with adverbs, and a :: in the name is not an adverb colon.

    use-ok "Sway::Config:auth<zef:CIAvash>" loads Sway::Config

use-ok-does-not-importRaku++ passesRakudo passes2026-10-03 · 72e93f3c · #124
  1. 1

    use-ok loads a module and imports nothing into the caller, so an exported MAIN does not run and an exported sub stays invisible.

use-ver-meta-providesRaku++ passesRakudo passes2026-09-08 · 5225417e
  1. 1

    A module found through a META6.json provides entry is still checked against the version constraint of the use statement.

    use Foo:ver<9.9+> does not load a dist whose version is 1.2.3

user-terms-across-unitsRaku++ passesRakudo passes2026-09-16 · fb4a6d59
  1. 1

    A sub term:<name> declared in a module is recognized as a term in a file that merely uses the module.

More from this test: Syntax & parsing (1).

who-stash-and-export-slotsRaku++ passesRakudo passes2026-07-29 · 58b38267
  1. 1

    .WHO answers one persistent stash per package, so entries can be assigned or bound into it.

    EXPORTHOW.WHO.<grammar> = ProfiledGrammarHOW and ::GLOBAL.WHO<X> := Metamodel::PackageHOW.new_type(…) work

  2. 2

    Foo::{EXPR} with a runtime key reads or writes the package's stash.

    BEGIN for <&a &b> { EXPORT::DEFAULT::{$_} = ::($_) } installs the exports

zef-install-clusterRaku++ passesRakudo passes2026-07-25 · da1b9b3d
  1. 4

    require ::($name) loads a module at runtime and evaluates to its type, and a failed require throws, so try require gives Nil.

    (try require ::($ = $module)) ~~ Nil is true for a missing module

More from this test: Containers & assignment (1), Exceptions & control flow (3), Types & coercion (1).