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 probes- 2
The compile-time undeclared-name check knows exactly what a
usebrings into scope, for every kind of symbol and export tag.
subset-importedRaku++ matches Rakudo on 24 of 36 probes- 2
An imported short type name means the same type in every declarator.
6e-pm-extensionRaku++ passesRakudo cannot run it- 1
From 6.e
.pmis not a module file extension: a 6.e program cannot load a module from a.pmfile, while a 6.d program still can.
battery-proto-new-x-stash-write-positionRaku++ passesRakudo passes- 2
A
my class X::Encode::Unknowndeclared insideunit module Encodelives in the GLOBALXpackage's stash, soX::Encode::Unknownnames it from outside, while its.^namestays the long, module-qualified one.
More from this test: I/O & processes (1), Classes, roles & the MOP (1).
battery-regressions-v5Raku++ passesRakudo passes- 6
A module loaded inside a block still sees the modules it loads itself. inferred
- 7
An export tag built by hand,
package EXPORT::tag { our &f = … }, is imported byusewith 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 passes- 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 passes- 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.mworks when ZB's method namesZA::Zfrom its ownuse ZA - 2
A package name brought in by a
useinside a bare block is not visible to the program's own code after the block.the program's own
ZB::Safter{ use ZB; … }is refused
bson-simple-and-hash-agnosticRaku++ passesRakudo passes- 1
use libtakes 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 passes- 1
A variable that a
used module declares withourbut does not export is not in the importer's scope: naming it isX::Undeclaredat compile time.use Z; say $Q, with Z's plainour $Q, is refused by-cAlso held by
check-unexported. - 2
A module with no
unitpackage puts itsournames in GLOBAL, where the importer sees them.
cro-live-clusterRaku++ passesRakudo passes- 1
An
is exportsub inside a bracedmoduleis exported even when its name collides with a built-in routine such asgetorput.
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 passes- 1
CompUnit::DependencySpecification.new(:short-name<Foo>)answers an object that smartmatchesCompUnit::DependencySpecification.
dynamic-var-caller-chainRaku++ passesRakudo does not pass- 5
use Foo:if(COND)skips the load when COND is false and loads the module and runs its EXPORT when true; a repeated bareusereplays EXPORT.
More from this test: Everything else (1), Scoping & phasers (3).
ecosweep-1000-batchRaku++ passesRakudo cannot run it- 2
A module that fails to parse raises a catchable run-time exception under
require, whereas underuseit aborts compilation.
More from this test: I/O & processes (1).
ecosweep-2026-09Raku++ passesRakudo passes- 3
use libtakes a comma-separated list of paths and adds every one of them. - 4
our $x is exportin a module is one container, shared between the module and the importer. - 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 pass- 1
use Mod ()andneed Modload a module and import nothing.after
use P5index (),index("foobar","zzz")is the built-in and answersNil
evalfileRaku++ passesRakudo cannot run it- 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 toEVAL.
evalfile-from-a-module-fileRaku++ passesRakudo passes- 1
$?FILEin a file run byEVALFILEfrom a routine in a module names the EVALFILE'd file's own path, not the module's.
exe-declarator-podRaku++ passesRakudo passes- 2
Declarator pod written in a module file reaches
.WHYof the module's declarations.
exe-imported-mainRaku++ passesRakudo passes- 2
A
multi sub MAIN(...) is exportimported withuseruns as the program's MAIN.
exe-routine-scope-shapesRaku++ passesRakudo passes- 4
A
usewritten 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 passesexport-failure-fails-the-useRaku++ passesRakudo passes- 1
A
dieinside a module'ssub EXPORTaborts the compilation of auseorneedof 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 passes- 1
A module that fills its
EXPORT::DEFAULTpackage by hand exports those names to ause.my package EXPORT::DEFAULT { }; BEGIN for <&config &bash> { EXPORT::DEFAULT::{$_} = ::($_) }makesbash(…)callable afteruse - 2
A plain
useimports from the EXPORT::DEFAULT and EXPORT::MANDATORY packages, a named tag from that tag's package and MANDATORY, and:ALLfrom the EXPORT::ALL package only.
export-sub-scopeRaku++ passesRakudo passes- 1
A
sub EXPORTwritten afterunit module FooisFoo::EXPORT, a sub of the package, and is not called onuse; only the compunit's ownEXPORT, written before theunitdeclaration or in a file with none, is the export protocol.
export-tag-selectiveRaku++ passesRakudo passes- 2
A name exported under several tags,
is export(:DEFAULT, :beta), is imported when any one of them is requested.use Mod :betaimports a name declaredis export(:DEFAULT, :beta)
export-tags-and-package-stashesRaku++ passesRakudo passesMore from this test: Syntax & parsing (1).
failed-use-fails-againRaku++ passesRakudo passes- 1
A
useof 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 secondusetoo
file-magical-in-moduleRaku++ passesRakudo passes- 1
$?FILEis 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
Inside a module
$?FILEis the absolute source path followed by the name the module was loaded as, in parentheses.…/QFile.rakumod (QFile) - 3
$?FILEis-efor code given with-e, without a directory prefix, and-for a program read from standard input. inferred
filesystem-repo-resolves-to-a-compunitRaku++ passesRakudo passesgrand-review-c4b-modules-seqRaku++ passesRakudo passes- 3
use Mod :ALLimports every exported name, tagged or not. - 4
The repository spec
-I file#/dirnames the directory/diras a module search path.
More from this test: Lists & laziness (1), Scoping & phasers (1).
implied-package-of-qualified-nameRaku++ passesRakudo passesimport-is-lexicalRaku++ passesRakudo passes- 1
An import is lexical: after
{ use Foo }the module's exportedfoo()is not callable outside the block. - 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
An
EVALparses only the operators imported into the scope it runs in. inferred - 4
A package-less module's
our suband an exported code variable are installed in GLOBAL. - 5
A
requirestubs its package at compile time. - 6
A
require "File"inside a method keeps what the file declares lexical to that method.
import-no-such-tagRaku++ passesRakudo passes- 1
use Mod :tagfor a tag the module exports nothing under dies withX::Import::NoSuchTag, on the firstuseand on a later one when the module is already loaded. - 2
An export tag that only a variable carries is still a valid tag for
use, and:ALLalways is. - 3
A
requirelist names symbols rather than tags, and a missing one throwsX::Import::MissingSymbols.
import-over-local-routineRaku++ passesRakudo passes- 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
needoruse M (), or when theuseis in another scope. - 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 passes- 1
import Mdoes not run the body of an already builtmodule M {…}again.
import-statement-tagsRaku++ passesRakudo passesimported-operator-spellingsRaku++ passesRakudo passes- 1
An operator imported from a module lexes whole in the importing file, as the file's own declaration of it would.
an imported
(<&)in1 (<&) 2,(+&),⨁⨁,√√4and1 +++ 2are each one operator, and an imported circumfix[[ ]]is not a plain array
installed-newest-version-winsRaku++ passesRakudo passes- 1
When several versions of one distribution are installed,
useloads the newest version that satisfies theusestatement's constraint.with 0.1.7 and 0.1.8 installed, a bare
useloads 0.1.8 - 2
Installed distribution versions are compared numerically segment by segment when
usepicks the newest.0.0.10is newer than0.0.9
invocant-smiley-and-role-multisRaku++ passesRakudo does not pass- 1
In a
unit rolefile theusestatements take effect before parent and role resolution, soalso does Xfinds 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 passes- 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 Nodeinsideunit module YAMLishisYAMLish::Nodeand nothing else
More from this test: Regexes & grammars (1), Types & coercion (1).
issue-170-exported-our-one-containerRaku++ passesRakudo passes- 1
A module's
our $X is exportis one container: the module's own code, the importer's bare$Xand the qualified$M::Xall see a write made through any of them, with or without an initializer.set-x(42)shows through$M::X, and$M::X = 7throughget-x()
issue-202-stash-our-variable-lookupRaku++ passesRakudo passes- 2
Only a module that exports something with
is exporthas anEXPORTpackage in its Stash.Circle::.keysis($pi)for a module that exports nothing
More from this test: Scoping & phasers (1).
issue-211-trait-is-candidatesRaku++ passesRakudo passes- 2
A multi that a module's
EXPORTsub hands out ('&trait_mod:<is>' => …) joins the importer's own multi group instead of replacing it.a module that declares
is zappedand then saysuse NativeLibskeeps its trait
More from this test: Signatures & dispatch (1).
issue35-zef-after-installRaku++ passesRakudo cannot run it- 4
CompUnit::Repository::Stagingexists: a distribution is staged in it and.deploymoves 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 it- 2
use Module:ver("*")accepts any version of the module.use Zef::Distribution:ver("*") - 3
A non-literal expression in
use Module:ver(EXPR)is not compared as source text against the candidates' versions. inferreduse Zef:ver($?DISTRIBUTION.meta<version> // '*')loads Zef - 4
$?DISTRIBUTIONin a module loaded through-Iis an object whose.metais 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 it- 1
A sub compiled under
use v6.e.PREVIEWkeeps 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 passes- 4
Importing a module does not stop user-defined
trait_mod:<is>traits already in scope from being applied.after
use NativeLibs, a user-definedistrait still applies
More from this test: Classes, roles & the MOP (4), Signatures & dispatch (1).
module-enum-is-ourRaku++ passesRakudo passes- 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 makesHTTP::HPACK::Indexing::Indexedresolve in the program - 2
enum G::Modeinsideunit module Gis G's ownMode, namedG::Mode. - 3
The bare member names of an enum a module declares outside any package, named or anonymous, reach the using program, whereas inside
unit modulethey do not, and amy enumpublishes neither its type nor its members.
module-extensions-exclude-rakuRaku++ passesRakudo passes- 1
A module name resolves to a
.rakumod,.pm6or (before 6.e).pmfile and never to a.rakufile, even with an explicit-I. - 2
A module kept in a
.rakufile is loadable when the distribution's META6providesnames that path, which is tried before any name-derived candidate.
More from this test: divergences (1).
module-name-caseRaku++ passesRakudo passes- 1
Module names are case-sensitive:
use Configdoes not load a file namedconfig.raku, even on a case-insensitive filesystem.
module-name-not-taken-by-nested-typeRaku++ passesRakudo passes- 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::Binmodule ModE::B,ModE::B.^nameisModE::B
module-quote-word-sub-scopeRaku++ passesRakudo passes- 2
A module's own unexported
sub qorsub sdoes not change howq{…}ors///reads in the file that uses the module; only a sub the import brings in (is export, or through anEXPORTsub) shadows the quote word.
More from this test: Syntax & parsing (1).
module-sees-not-the-programs-operatorsRaku++ passesRakudo passes- 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'seqvalthough the program imported amulti infix:<eqv>
module-trait-exported-from-beginRaku++ passesRakudo passes- 1
A routine marked
is exportthat a module declares in a nested block, such as aBEGIN, reaches the importer. - 2
Metamodel::ClassHOWnames the setting's class even after a distribution's ownFoo::Metamodel::ClassHOWis loaded, while inside a module its own nestedMetamodel::Minestill answers the short name.when Metamodel::ClassHOWstill matches a class's HOW
module-variables-stay-the-modulesRaku++ passesRakudo passes- 1
Only the variables a module exports reach its importer under their bare names; an unexported
ouris reachable by its package name ($UM::v) and the importer's ownourof the same name is a separate variable.after
use UMwhere UM hasour $v = 1, the program's ownour $visAny - 2
::('$name')in a program does not find a privatemyvariable of a module it loaded.
my-stash-sees-test-importsRaku++ passesRakudo passes- 1
What
use Testimports is in the importing scope's stash, throughMY::,UNIT::,LEXICAL::andOUTER::.MY::.keyshas&okandMY::<&ok>:existsis True
More from this test: Scoping & phasers (1).
native-and-resourcesRaku++ passesRakudo does not pass- 5
An
our subdeclared in anEVAL'dunit moduleresolves by its fully-qualified name.
More from this test: Native types & NativeCall (3).
native-lib-expression-and-resourcesRaku++ passesRakudo passes- 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 passes- 1
A
useinside a routine or block keeps only the top-level name it loads lexical while the package's contents merge into GLOBAL, soG::Pathresolves whereverGis visible some other way and stays unknown when the nested load alone broughtG.
package-gapsRaku++ passesRakudo passes- 1
GLOBAL::.keyslists every package-scoped name.class A::Bgives it A
More from this test: Compile-time errors (1), Classes, roles & the MOP (1).
package-relative-namesRaku++ passesRakudo passes- 1
A class declared with a qualified name such as
URI::Pathcan be found by its last name componentPathwhen that short name is otherwise free, but a user type never shadows a built-in type of the same short name. inferredX::Roast::Channeldoes not hijackChannel - 3
A
usestatement 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 passes- 1
Foo::<bar>is a slot in packageFoo's symbol table and can be assigned.EXPORTHOW::<class> = TestHOWinstalls the entry
More from this test: Classes, roles & the MOP (1).
package-then-role-coexistRaku++ passesRakudo passes- 1
A bare
package Foo { }block may be followed by aclass,roleorgrammarof the same name, which refines it.package Foo { our sub … }thenrole Foo { … }compiles
More from this test: Compile-time errors (2).
parse-unicode-and-shapesRaku++ passesRakudo passes- 3
requirewith 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 passes- 39
A second
use Mod :&namewidens what an earlier, narroweruseof 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 passes- 5
Pod::To::Textis a core module:use Pod::To::Textprovidespod2text.
More from this test: Everything else (4).
precomp-langrevRaku++ passesRakudo passes- 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 passes- 2
A routine the program declares is not replaced by a same-named routine of a
used module that theusedid not import. - 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 passes- 1
$*RAKU.versionis the main program's language revision, whichever compilation unit reads it.a module headed
use v6.*loaded from a 6.d program sees$*RAKU.versionas 6.d
rakudo-t-language-gaps-3Raku++ passesRakudo passes- 2
our &f is export = …puts&fin 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 passes- 1
A bare
require Fooimports 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 foomayrequire Foowhosefooisis exportwithout a redeclaration errorAlso held by
require-imports.
require-path-loads-file-runs-mainRaku++ passesRakudo passes- 1
requirewith a file path (require "path"orrequire Stub:file(path)) loads that very file, compiles it as a mainline and runs itsMAINon@*ARGS, whereas auseof the same file does not runMAIN.require "/abs/path/Build.pm6"runs that file'ssub MAIN - 2
requireof an absolute path that does not exist throws.
require-symbolic-nameRaku++ passesRakudo passes- 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 passes- 1
A sub whose return type names a class declared in the same
unit modulecan be called from another compilation unit.
roast-3log-batch2Raku++ passesRakudo passes- 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-timeusedoes 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 passes- 2
Each compilation unit sees a package through what it uses itself:
Pkg::.keyslists the types its own imports brought, not everyPkg::*loaded anywhere. - 3
The program's
MY::holds its own lexicals only: not a type some moduleneeded, nor anyMod::EXPORT::…. - 4
$cu.handle.globalish-packageis that compilation unit's own GLOBALish. - 5
use lib "inst#$path"evaluates the string and makes that installation repository the head of$*REPO, which does Installable and Locally. - 6
An explicit installation repository installs
Distribution::Hash/Distribution::Path, lists and matches candidates,needs one without merging its globals untilGLOBALish.WHO.merge-symbols, and uninstalls. - 7
A FileSystem repository answers candidates from its directory tree, and a distribution's
.contentis a handle on the file it holds.
More from this test: Concurrency (1).
roast-sweep-runtimeRaku++ passesRakudo cannot run it- 2
importtakes the EXPORT tags it is asked for. inferred - 9
A
my subsetdeclared 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 passes- 4
A failed runtime
requirethrows an exception and emits no warning, sotry 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 itstub-role-after-useRaku++ passesRakudo passes- 1
A stub declaration
role R {...}whose name matches a module loaded withuseis legal and raises noX::Package::Stubbed.use RoleB; role RoleB {...}compiles
tagged-code-constant-exportRaku++ passesRakudo passes- 1
A code constant or
our &varexported under a tag is imported only by that tag, as a sub is.constant &sp is export(:shortcuts) = &drop-spacesreachesuse Mod :shortcuts, and a bareuse Modleaves it out
telemetry-moduleRaku++ passesRakudo passes- 1
use Telemetryloads the core Telemetry module, withT<max-rss>,T{"max-rss"}, snaps, periods and the report.
test-and-nativecall-routines-need-useRaku++ passesRakudo passestop100-chunk-c-b1-2026-09-03Raku++ passesRakudo does not pass- 2
require Mod:ver(...)with:veror:authadverbs 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 passesMore from this test: divergences (1).
top100-four-roots-2026-09-02Raku++ passesRakudo cannot run it- 5
A source file loaded through
CompUnit::PrecompilationRepository.try-loadmay not containuse 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 pass- 6
A
my constantdeclaredis export(tagged or untagged) in aunit classbody 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 it- 1
A file headed
unit module Foo;publishes itsour subs under the qualified name, so the program can callFoo::name()itself.unit module Quux; our sub deep { "d" }; say Quux::deep();printsd
unit-stash-exists-under-import-listRaku++ passesRakudo passesuse-if-is-answered-nativelyRaku++ passesRakudo passes- 1
use if;loads, anduse Foo:if(EXPR)skips loadingFoowhen EXPR is false.
use-in-routine-bodyRaku++ passesRakudo cannot run it- 1
A
useof a missing module inside a routine body is refused at compile time even when nobody calls the routine.
use-ok-adverbed-nameRaku++ passesRakudo passes- 1
use-oktakes a module spec with adverbs, and a::in the name is not an adverb colon.use-ok "Sway::Config:auth<zef:CIAvash>"loadsSway::Config
use-ok-does-not-importRaku++ passesRakudo passes- 1
use-okloads a module and imports nothing into the caller, so an exportedMAINdoes not run and an exported sub stays invisible.
use-ver-meta-providesRaku++ passesRakudo passes- 1
A module found through a
META6.jsonprovidesentry is still checked against the version constraint of theusestatement.use Foo:ver<9.9+>does not load a dist whose version is 1.2.3
user-terms-across-unitsRaku++ passesRakudo passes- 1
A
sub term:<name>declared in a module is recognized as a term in a file that merelyuses the module.
More from this test: Syntax & parsing (1).
who-stash-and-export-slotsRaku++ passesRakudo passes- 1
.WHOanswers one persistent stash per package, so entries can be assigned or bound into it.EXPORTHOW.WHO.<grammar> = ProfiledGrammarHOWand::GLOBAL.WHO<X> := Metamodel::PackageHOW.new_type(…)work - 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 passes- 4
require ::($name)loads a module at runtime and evaluates to its type, and a failedrequirethrows, sotry requiregivesNil.(try require ::($ = $module)) ~~ Nilis true for a missing module
More from this test: Containers & assignment (1), Exceptions & control flow (3), Types & coercion (1).