NAME

App::karr::Role::ClaimDefault - Default a command's claim name from KARR_CLAIM when the flag is omitted

VERSION

version 0.601

DESCRIPTION

The one place the --claim default is resolved. ADR 0005 carries the claim name per process in the KARR_CLAIM environment variable: every command that takes --claim (App::karr::Cmd::Move, App::karr::Cmd::Handoff, App::karr::Cmd::Pick, App::karr::Cmd::Edit, App::karr::Cmd::Create) and karr list --claimed-by (App::karr::Cmd::List) defaults to $KARR_CLAIM when the flag is omitted. An explicit value on the command line always wins; there is no silent fallback to anything else. create is the one narrower consumer: it reads the default only when --status names a column that requires a claim (ticket #286), so a card filed for whoever picks it next stays unclaimed.

The seven option claim / option claimed_by declarations differ in wording and in whether they were required (pick and handoff were), so they are left where they are; what is shared is only the resolution -- "resolved_claim" and "resolved_claimed_by" -- so no command reads $ENV{KARR_CLAIM} or decodes it itself.

KARR_CLAIM crosses the character/octet boundary like every environment value (CLAUDE.md, "characters inside, octets only at the edges"): "from_octets_from_env" in App::karr::Encoding decodes it here, the mirror of the to_octets_for_env path App::karr::Foundation::Runner writes it through.

env_claim

my $name = $self->env_claim;   # decoded KARR_CLAIM, or undef

The claim name from KARR_CLAIM, decoded to a character string, or undef when the variable is unset or empty.

has_env_claim

... if $self->has_env_claim;

True when KARR_CLAIM holds a non-empty value. A presence test, so it does not decode -- the value never crosses the boundary here, only its emptiness is asked.

resolved_claim

my $claim = $self->resolved_claim;

The effective claim for a command that declares option claim: the explicit --claim value when one was given, otherwise "env_claim". Used everywhere a command used to read $self->claim for claiming.

resolved_claimed_by

my $owner = $self->resolved_claimed_by;

The list --claimed-by counterpart of "resolved_claim", reading option claimed_by: the explicit filter value, otherwise "env_claim".

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/karr/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 <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)