NAME
Langertha::Raider::Packs::Collection - Set of loaded raider packs with per-session enable state
VERSION
version 0.503
DESCRIPTION
Returned by "build_packs" in Langertha::Raider::Packs. Tracks which packs are enabled, honouring exclusive groups, and why: every enabled pack has a source (default, flag, config, detected, manual) and a reason, and the outcome of each detection rule (ADR 0012) is kept for "activation_report".
sources
Why each enabled pack is on: { NAME => { source, reason } }.
switched_off
Packs switched off explicitly (--no-pack): { NAME => { source, reason } }.
detections
Outcome of each detection rule: { NAME => { rule_from, result, reason, notes } }, result being matched, not matched or skipped.
skipped_packs
Pack directories that could not be loaded, in search order: [ { name, origin, path, reason } ] (see "build_packs" in Langertha::Raider::Packs).
enable
$collection->enable('polite'); # enable polite (toggles off caveman)
$collection->enable('git-guru'); # stack git-guru on top
$collection->enable('teacher', config => '.raider.yml packs:');
The optional source and reason say why ("sources"); they default to manual and /pack.
disable
$collection->disable('caveman');
$collection->disable('git-guru', flag => '--no-pack');
With a source and reason the pack is recorded in "switched_off".
toggle
$collection->toggle('polite'); # on if off, off if on
enable_detected
my $holder = $collection->enable_detected('perl', $clause);
Enables a detected pack with source detected, unless its exclusive group already holds a pack that is not merely a default one: explicit beats detected, and the first detected pack of a group keeps it. Returns the name of that holder when the pack stays off, nothing when it was enabled.
activation_report
my @packs = @{ $collection->activation_report };
One entry per pack that is enabled, was switched off explicitly or has a detection outcome, sorted by name; rules for packs that are not installed come last. origin is "origin" in Langertha::Raider::Packs::Pack:
{ name => 'perl', exclusive_group => 'power', origin => 'shipped',
active => 1,
source => 'detected', reason => 'must file=cpanfile (cpanfile)',
detection => { rule_from => 'pack default', result => 'matched',
reason => '...', notes => [] } }
skill_texts
my @texts = $collection->skill_texts;
The SKILL.md texts of the enabled packs, in the order they were enabled, each headed ### Pack: NAME; packs without one are left out.
requested_tools
my @servers = @{ $collection->requested_tools }; # ['perl']
The built-in tool servers the enabled packs request (tools: in pack.yml), sorted and deduplicated. A request, not a grant.
active_pack_names
ArrayRef of the names of the packs currently enabled, in the order they were enabled.
is_active
if ($collection->is_active('caveman')) { ... }
pack_info
my $info = $collection->pack_info('caveman');
# { name, exclusive_group, is_active, has_skill_text, path, origin }
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha-raider/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.