{"atom":"regression/zef-install-cluster","family":"regression","slug":"zef-install-cluster","header":{"atom":"regression/zef-install-cluster","kind":"whole-program — a minimal repro, not yet reduced to an atom","source":"curated"},"axes":null,"cols":null,"engines":["rakudo-2026.07","rakupp-3.14.0"],"kinds":["ref","pp"],"defFrom":"rakupp:t/regression/zef-install-cluster.raku","counts":{"a":1,"f":0,"d":0,"c":0,"r":0,"n":0},"files":["atoms/regression/zef-install-cluster.grid"],"records":[["0001","","# Regression: the cluster of general fixes that made `zef install <path>` work\n# END-TO-END from the CLI under rakupp (each verified against Rakudo):\n#   1. a `given` whose `when`s all miss evaluates to False (not Any) — a\n#      non-matching `when` is its smartmatch result. zef's license filter keeps\n#      candidates via `.?chars` on that result (5 for \"False\", truthy).\n#   2. element mutation through a read-only accessor chain: `$c.dist.metainfo<k> = v`\n#      mutates the hash the RO attr holds (only direct `$c.ro = v` dies).\n#   3. `gather LABEL: for … { next LABEL }` — a labeled loop after gather.\n#   4. dynamic `require ::($name)` loads the module at runtime and yields its\n#      type; a failed require throws (so `try require` gives Nil). zef probes\n#      every plugin with `(try require ::($ = $module)) ~~ Nil`.\n#   5. `next()`/`last()` call form is the control op itself; composes as\n#      `next() R, DEBUG(...) if COND` (zef's plugin-skip idiom) — used to skip\n#      unconditionally at statement level and die in expression position.\n#   6. Any.hash is an empty Hash (`$dist.meta<files>.hash.keys` with no files).\n# Contract: exit 0 + last line PASS.\nmy @fail;\n\n# 1. given with no matching when => False\nmy %empty;\nmy $r = do given %empty {\n    when .<blacklist>.?chars { 'bl' }\n    when .<whitelist>.?chars && 0 { 'wl' }\n}\n@fail.push('given-nomatch') unless $r === False && $r.?chars == 5;\n@fail.push('given-match') unless (do given 5 { when 5 { 'hit' } }) eq 'hit';\n\n# 2. mutation through an RO accessor chain\nclass D2 { has %.metainfo is rw; }\nclass C2 { has $.dist; }\nmy $c = C2.new(dist => D2.new);\n$c.dist.metainfo<marked> = 1;\n@fail.push('chain-mutate') unless $c.dist.metainfo<marked> == 1;\nmy $died = False;\ntry { $c.dist = D2.new; CATCH { default { $died = True } } }\n@fail.push('ro-still-dies') unless $died;\n\n# 3. labeled loop after gather\nmy @g = gather L: for 1..3 -> $x { for 1..2 { take $x; next L } }\n@fail.push('gather-label') unless @g eqv [1, 2, 3];\n\n# 4. dynamic require\n@fail.push('require-fail-nil') unless (try require ::('No::Such::Module::Here')) ~~ Nil;\n\n# 5. next()/last() call form + the R, idiom\nmy @kept = gather for 1..4 -> $x {\n    next() R, $ = \"note\" if $x %% 2;\n    take $x;\n}\n@fail.push('next-paren-idiom') unless @kept eqv [1, 3];\nmy @stopped = gather for 1..5 -> $x { last() if $x == 3; take $x }\n@fail.push('last-paren') unless @stopped eqv [1, 2];\n\n# 6. Any.hash\nmy $undef;\n@fail.push('any-hash') unless $undef.hash.keys.elems == 0;\n\nif @fail { note \"FAILED: @fail[]\"; say 'FAIL' } else { say 'PASS' }","output PASS","a",["PASS","PASS"],0,[["budget","20s"]]]]}