| 1 | package Langertha::Raider::EngineResolver; | ||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Internal choice of engine, model and API key for a raider | ||||||||||||||||||||||||||||||||||||||
| 3 | 81 | our $VERSION = '0.503'; | |||||||||||||||||||||||||||||||||||||
| 4 | 81 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 5 | 81 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 6 | 81 | ▶ | use Carp qw( croak ); | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 7 | 81 | ▶ | use Module::Runtime (); | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||
| 11 | 81 | has config => ( | |||||||||||||||||||||||||||||||||||||
| 12 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 13 | isa => 'Langertha::Raider::Config', | ||||||||||||||||||||||||||||||||||||||
| 14 | required => 1, | ||||||||||||||||||||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||
| 18 | has engine_options => ( | ||||||||||||||||||||||||||||||||||||||
| 19 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 20 | isa => 'HashRef', | ||||||||||||||||||||||||||||||||||||||
| 21 | 37 | ▶ | default => sub { {} }, | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 22 | 81 | ); | |||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||
| 25 | 81 | has provider => ( | |||||||||||||||||||||||||||||||||||||
| 26 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 27 | isa => 'HashRef', | ||||||||||||||||||||||||||||||||||||||
| 28 | predicate => 'has_provider', | ||||||||||||||||||||||||||||||||||||||
| 29 | ); | ||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||
| 32 | 81 | has engine_name => ( | |||||||||||||||||||||||||||||||||||||
| 33 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 34 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||
| 35 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||
| 36 | builder => '_build_engine_name', | ||||||||||||||||||||||||||||||||||||||
| 37 | init_arg => 'engine', | ||||||||||||||||||||||||||||||||||||||
| 38 | ); | ||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||
| 40 | 40 | ▶ | sub _build_engine_name { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
_build_engine_name: called CC=11 SCAR=24.2
| |||||||||||||||||||||||||||||||||||||||
| 41 | 40 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 42 | 40 | ▶ | return $self->provider->{engine_name} if $self->has_provider; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 43 | 12 | my $opt = $self->engine_options->{engine}; | |||||||||||||||||||||||||||||||||||||
| 44 | 12 | ▶ | return $opt if defined $opt && length $opt; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $opt and length $opt
MC/DC50%1/2
defined $opt and length $opt
defined $opt
length $opt
Truth table66%2/3
A and B
A= defined $optB= length $opt
| |||||||||||||||||||||||||||||||||||||||
| 45 | 9 | my $yml = $self->config->engine; | |||||||||||||||||||||||||||||||||||||
| 46 | 9 | ▶ | return $yml if defined $yml; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 47 | 4 | ▶ | return 'anthropic' if $ENV{ANTHROPIC_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 48 | 3 | ▶ | return 'openai' if $ENV{OPENAI_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 49 | 2 | ▶ | return 'deepseek' if $ENV{DEEPSEEK_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 50 | 2 | ▶ | return 'groq' if $ENV{GROQ_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 51 | 1 | ▶ | return 'mistral' if $ENV{MISTRAL_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 52 | 1 | ▶ | return 'gemini' if $ENV{GEMINI_API_KEY}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 53 | 1 | return 'anthropic'; | |||||||||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||
| 56 | 81 | my %DEFAULT_MODEL = ( | |||||||||||||||||||||||||||||||||||||
| 57 | anthropic => 'claude-haiku-4-5', | ||||||||||||||||||||||||||||||||||||||
| 58 | openai => 'gpt-4o-mini', | ||||||||||||||||||||||||||||||||||||||
| 59 | deepseek => 'deepseek-chat', | ||||||||||||||||||||||||||||||||||||||
| 60 | groq => 'llama-3.3-70b-versatile', | ||||||||||||||||||||||||||||||||||||||
| 61 | mistral => 'mistral-small-latest', | ||||||||||||||||||||||||||||||||||||||
| 62 | gemini => 'gemini-2.5-flash', | ||||||||||||||||||||||||||||||||||||||
| 63 | cerebras => 'llama3.1-8b', | ||||||||||||||||||||||||||||||||||||||
| 64 | ); | ||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||
| 66 | 81 | my %ENV_VAR = ( | |||||||||||||||||||||||||||||||||||||
| 67 | anthropic => 'ANTHROPIC_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 68 | openai => 'OPENAI_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 69 | deepseek => 'DEEPSEEK_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 70 | groq => 'GROQ_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 71 | mistral => 'MISTRAL_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 72 | gemini => 'GEMINI_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 73 | minimax => 'MINIMAX_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 74 | cerebras => 'CEREBRAS_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 75 | openrouter => 'OPENROUTER_API_KEY', | ||||||||||||||||||||||||||||||||||||||
| 76 | ollama => undef, | ||||||||||||||||||||||||||||||||||||||
| 77 | ); | ||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||
| 79 | 81 | my %ENGINE_CLASS = ( | |||||||||||||||||||||||||||||||||||||
| 80 | anthropic => 'Langertha::Engine::Anthropic', | ||||||||||||||||||||||||||||||||||||||
| 81 | openai => 'Langertha::Engine::OpenAI', | ||||||||||||||||||||||||||||||||||||||
| 82 | deepseek => 'Langertha::Engine::DeepSeek', | ||||||||||||||||||||||||||||||||||||||
| 83 | groq => 'Langertha::Engine::Groq', | ||||||||||||||||||||||||||||||||||||||
| 84 | mistral => 'Langertha::Engine::Mistral', | ||||||||||||||||||||||||||||||||||||||
| 85 | gemini => 'Langertha::Engine::Gemini', | ||||||||||||||||||||||||||||||||||||||
| 86 | minimax => 'Langertha::Engine::MiniMax', | ||||||||||||||||||||||||||||||||||||||
| 87 | cerebras => 'Langertha::Engine::Cerebras', | ||||||||||||||||||||||||||||||||||||||
| 88 | openrouter => 'Langertha::Engine::OpenRouter', | ||||||||||||||||||||||||||||||||||||||
| 89 | ollama => 'Langertha::Engine::Ollama', | ||||||||||||||||||||||||||||||||||||||
| 90 | ); | ||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||
| 92 | 81 | my @ENGINE_NAMES = qw( | |||||||||||||||||||||||||||||||||||||
| 93 | anthropic openai deepseek groq mistral gemini minimax cerebras openrouter ollama | ||||||||||||||||||||||||||||||||||||||
| 94 | ); | ||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||||||||
| 97 | 8 | ▶ | sub engine_names { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
engine_names: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 98 | 8 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 99 | 8 | return @ENGINE_NAMES; | |||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||
| 103 | 5 | ▶ | sub api_key_env_vars { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
api_key_env_vars: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 104 | 5 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 105 | 5 | return grep { defined } map { $self->env_var_for_engine($_) } $self->engine_names; | |||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||
| 109 | 263 | ▶ | sub env_var_for_engine { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
env_var_for_engine: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 110 | 263 | my ( $self, $engine ) = @_; | |||||||||||||||||||||||||||||||||||||
| 111 | 263 | return $ENV_VAR{$engine}; | |||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||
| 115 | 93 | ▶ | sub default_model_for_engine { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
default_model_for_engine: called CC=5 SCAR=16.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 116 | 93 | my ( $self, $engine ) = @_; | |||||||||||||||||||||||||||||||||||||
| 117 | 93 | ▶ | return $DEFAULT_MODEL{$engine} if defined $DEFAULT_MODEL{$engine}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 118 | 5 | ▶ | my $class = $ENGINE_CLASS{$engine} or return undef; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 119 | 5 | my $model = eval { | |||||||||||||||||||||||||||||||||||||
| 120 | 5 | Module::Runtime::require_module($class); | |||||||||||||||||||||||||||||||||||||
| 121 | 5 | $class->default_model; # croaks on engines that demand an explicit model | |||||||||||||||||||||||||||||||||||||
| 122 | }; | ||||||||||||||||||||||||||||||||||||||
| 123 | 5 | ▶ | return defined $model && length $model ? $model : undef; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $model and length $model
MC/DC50%1/2
defined $model and length $model
defined $model
length $model
Truth table66%2/3
A and B
A= defined $modelB= length $model
| |||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||
| 127 | 81 | has model => ( | |||||||||||||||||||||||||||||||||||||
| 128 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 129 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||
| 130 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||
| 131 | builder => '_build_model', | ||||||||||||||||||||||||||||||||||||||
| 132 | ); | ||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||
| 134 | 143 | ▶ | sub _build_model { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
_build_model: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||
| 135 | 143 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 136 | 143 | ▶ | return $self->provider->{model} if $self->has_provider; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 137 | return $self->engine_options->{model} | ||||||||||||||||||||||||||||||||||||||
| 138 | // $self->engine_yml_options->{model} | ||||||||||||||||||||||||||||||||||||||
| 139 | 115 | ▶ | // $DEFAULT_MODEL{$self->engine_name} | ||||||||||||||||||||||||||||||||||||
|
Condition100%8/8
(($self->engine_options->{"model"} // $self->engine_yml_options->{"model"}) // $DEFAULT_MODEL{$self->engine_name}) // ""
($self->engine_options->{"model"} // $self->engine_yml_options->{"model"}) // $DEFAULT_MODEL{$self->engine_name}
$self->engine_options->{"model"} // $self->engine_yml_options->{"model"}
MC/DC100%3/3
(($self->engine_options->{"model"} // $self->engine_yml_options->{"model"}) // $DEFAULT_MODEL{$self->engine_name}) // ""
$self->engine_options->{"model"}
$self->engine_yml_options->{"model"}
$DEFAULT_MODEL{$self->engine_name}
Truth table100%4/4
A // B // C
A= $self->engine_options->{"model"}B= $self->engine_yml_options->{"model"}C= $DEFAULT_MODEL{$self->engine_name}
| |||||||||||||||||||||||||||||||||||||||
| 140 | // ''; | ||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||
| 144 | 139 | ▶ | sub has_model { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
has_model: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 145 | 139 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 146 | 139 | ▶ | return length($self->model) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||
| 150 | 81 | has api_key => ( | |||||||||||||||||||||||||||||||||||||
| 151 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||
| 152 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||
| 153 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||
| 154 | builder => '_build_api_key', | ||||||||||||||||||||||||||||||||||||||
| 155 | ); | ||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||
| 157 | 31 | ▶ | sub _build_api_key { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
_build_api_key: called CC=7 SCAR=19.5
| |||||||||||||||||||||||||||||||||||||||
| 158 | 31 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 159 | 31 | ▶ | return $self->engine_options->{api_key} // '' if $self->has_provider; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$self->engine_options->{"api_key"} // ""
MC/DC100%1/1
$self->engine_options->{"api_key"} // ""
$self->engine_options->{"api_key"}
Truth table100%2/2
A
A= $self->engine_options->{"api_key"}
| |||||||||||||||||||||||||||||||||||||||
| 160 | 21 | ▶ | my $configured =$self->engine_options->{api_key} // $self->engine_yml_options->{api_key}; | ||||||||||||||||||||||||||||||||||||
|
Condition100%3/3
$self->engine_options->{"api_key"} // $self->engine_yml_options->{"api_key"}
MC/DC100%2/2
$self->engine_options->{"api_key"} // $self->engine_yml_options->{"api_key"}
$self->engine_options->{"api_key"}
$self->engine_yml_options->{"api_key"}
Truth table100%3/3
A // B
A= $self->engine_options->{"api_key"}B= $self->engine_yml_options->{"api_key"}
| |||||||||||||||||||||||||||||||||||||||
| 161 | 21 | ▶ | return $configured if defined $configured; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 162 | 15 | my $var = $self->env_var_for_engine($self->engine_name); | |||||||||||||||||||||||||||||||||||||
| 163 | 15 | ▶ | return '' unless $var; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 164 | 13 | ▶ | return $ENV{$var} // ''; | ||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$ENV{$var} // ""
MC/DC100%1/1
$ENV{$var} // ""
$ENV{$var}
Truth table100%2/2
A
A= $ENV{$var}
| |||||||||||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||
| 168 | 128 | ▶ | sub api_key_env { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
api_key_env: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 169 | 128 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 170 | 128 | ▶ | return undef if $self->has_provider; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 171 | 110 | return $self->env_var_for_engine($self->engine_name); | |||||||||||||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||
| 175 | 260 | ▶ | sub engine_class { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
engine_class: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 176 | 260 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 177 | 260 | ▶ | return $self->provider->{engine_class} if $self->has_provider; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 178 | 229 | ▶ | my $class = $ENGINE_CLASS{$self->engine_name} | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 179 | or die "Unknown engine: ".$self->engine_name."\n"; # die: the message is shown as is | ||||||||||||||||||||||||||||||||||||||
| 180 | 225 | return $class; | |||||||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||
| 184 | 277 | ▶ | sub engine_yml_options { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
engine_yml_options: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 185 | 277 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 186 | 277 | return $self->config->engine_options($self->engine_name); | |||||||||||||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||
| 190 | 223 | ▶ | sub cli_engine_options { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
cli_engine_options: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 191 | 223 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||
| 192 | 223 | my $opts = $self->engine_options; | |||||||||||||||||||||||||||||||||||||
| 193 | 223 | return { map { $_ => $opts->{$_} } grep { !$self->config->is_app_key($_) } keys %$opts }; | |||||||||||||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||
| 197 | 135 | ▶ | sub engine_args { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
engine_args: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 198 | 135 | my ( $self, %extra ) = @_; | |||||||||||||||||||||||||||||||||||||
| 199 | my %args = ( | ||||||||||||||||||||||||||||||||||||||
| 200 | 135 | %{$self->engine_yml_options}, | |||||||||||||||||||||||||||||||||||||
| 201 | 135 | %{$self->cli_engine_options}, | |||||||||||||||||||||||||||||||||||||
| 202 | %extra, | ||||||||||||||||||||||||||||||||||||||
| 203 | ); | ||||||||||||||||||||||||||||||||||||||
| 204 | 135 | delete @args{qw( model api_key )}; | |||||||||||||||||||||||||||||||||||||
| 205 | 135 | ▶ | $args{api_key} = $self->api_key if length $self->api_key; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 206 | 135 | ▶ | $args{model} = $self->model if $self->has_model; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 207 | 135 | ▶ | if ($self->has_provider) { | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 208 | 26 | my $address = $self->provider->{connect_address}; | |||||||||||||||||||||||||||||||||||||
| 209 | 26 | ▶ | croak __PACKAGE__.': the provider activation carries no connect_address; not building an unpinned engine' | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $address and length $address
MC/DC100%2/2
defined $address and length $address
defined $address
length $address
Truth table100%3/3
A and B
A= defined $addressB= length $address
| |||||||||||||||||||||||||||||||||||||||
| 210 | unless defined $address && length $address; | ||||||||||||||||||||||||||||||||||||||
| 211 | 24 | $args{url} = $self->provider->{url}; | |||||||||||||||||||||||||||||||||||||
| 212 | 24 | $args{connect_address} = $address; | |||||||||||||||||||||||||||||||||||||
| 213 | 24 | ▶ | $args{api_key} = length $self->api_key ? $self->api_key : undef; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||||||||||||
| 215 | 133 | return %args; | |||||||||||||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||
| 219 | 119 | ▶ | sub build_engine { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
build_engine: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 220 | 119 | my ( $self, %extra ) = @_; | |||||||||||||||||||||||||||||||||||||
| 221 | 119 | my $class = $self->engine_class; | |||||||||||||||||||||||||||||||||||||
| 222 | 119 | Module::Runtime::require_module($class); | |||||||||||||||||||||||||||||||||||||
| 223 | 119 | my $engine = $class->new($self->engine_args(%extra)); | |||||||||||||||||||||||||||||||||||||
| 224 | 117 | ▶ | if ($self->has_provider && $engine->can('user_agent')) { | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->has_provider and $engine->can("user_agent")
MC/DC50%1/2
$self->has_provider and $engine->can("user_agent")
$self->has_provider
$engine->can("user_agent")
Truth table66%2/3
A and B
A= $self->has_providerB= $engine->can("user_agent")
| |||||||||||||||||||||||||||||||||||||||
| 225 | # Not for the key (Langertha's agent strips it on another origin), and | ||||||||||||||||||||||||||||||||||||||
| 226 | # no longer for another host (the pin refuses that hop, k141): for the | ||||||||||||||||||||||||||||||||||||||
| 227 | # origin. The pin follows a hop on the same host to another port. | ||||||||||||||||||||||||||||||||||||||
| 228 | 24 | $engine->user_agent->max_redirect(0); | |||||||||||||||||||||||||||||||||||||
| 229 | 24 | $engine->user_agent->requests_redirectable([]); | |||||||||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||||||||
| 231 | 117 | return $engine; | |||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||
| 234 | 81 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||
| 236 | 81 | 1; | |||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||
| 238 | __END__ | ||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||
| 240 | =pod | ||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||
| 242 | =encoding UTF-8 | ||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||
| 244 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||
| 246 | Langertha::Raider::EngineResolver - Internal choice of engine, model and API key for a raider | ||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||
| 248 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||
| 250 | version 0.503 | ||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||
| 252 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||
| 254 | # Internal to Langertha-Raider -- no API promise. | ||||||||||||||||||||||||||||||||||||||
| 255 | my $resolver = Langertha::Raider::EngineResolver->new( | ||||||||||||||||||||||||||||||||||||||
| 256 | config => $config, # Langertha::Raider::Config | ||||||||||||||||||||||||||||||||||||||
| 257 | engine_options => { temperature => 0.2 }, # the -o pairs | ||||||||||||||||||||||||||||||||||||||
| 258 | engine => 'openai', # optional, -e | ||||||||||||||||||||||||||||||||||||||
| 259 | ); | ||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||
| 261 | my $name = $resolver->engine_name; # 'openai' | ||||||||||||||||||||||||||||||||||||||
| 262 | my $class = $resolver->engine_class; # 'Langertha::Engine::OpenAI' | ||||||||||||||||||||||||||||||||||||||
| 263 | my %args = $resolver->engine_args(mcp_servers => \@clients); | ||||||||||||||||||||||||||||||||||||||
| 264 | my $engine = $resolver->build_engine(mcp_servers => \@clients); | ||||||||||||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||||||||||||
| 266 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||
| 268 | B<Internal module.> Its interface may change without notice. | ||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||
| 270 | The provider choice of L<Langertha::Raider::Application>: which engine | ||||||||||||||||||||||||||||||||||||||
| 271 | (flag, C<-o engine=>, C<engine:> in F<.raider.yml>, the first C<*_API_KEY> | ||||||||||||||||||||||||||||||||||||||
| 272 | in the environment, C<anthropic>), which model and API key it is built | ||||||||||||||||||||||||||||||||||||||
| 273 | with, and the constructor arguments of the L<Langertha> engine class -- | ||||||||||||||||||||||||||||||||||||||
| 274 | the F<.raider.yml> engine options, the C<-o> engine options on top, and | ||||||||||||||||||||||||||||||||||||||
| 275 | the model and key. Builds nothing but the engine itself. | ||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||
| 277 | With L</provider> (C<raider --provider>) the provider activation decides | ||||||||||||||||||||||||||||||||||||||
| 278 | engine, engine class, model and URL instead, and the API key comes only | ||||||||||||||||||||||||||||||||||||||
| 279 | from the command line -- see L</provider>. | ||||||||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||||||||
| 281 | =head2 config | ||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||
| 283 | The L<Langertha::Raider::Config> of the workspace. Required. | ||||||||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||||||||
| 285 | =head2 engine_options | ||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||
| 287 | HashRef of the C<-o KEY=VALUE> options, raider's own keys (see | ||||||||||||||||||||||||||||||||||||||
| 288 | L<Langertha::Raider::Config/is_app_key>) included; only C<engine> of | ||||||||||||||||||||||||||||||||||||||
| 289 | those is read here. | ||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||
| 291 | =head2 provider | ||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||
| 293 | The completed activation of C<raider --provider> | ||||||||||||||||||||||||||||||||||||||
| 294 | (L<Langertha::Raider::Provider::Activation/activate_f>), or none. With it: | ||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||
| 296 | =over | ||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||
| 298 | =item * L</engine_name>, L</engine_class> and L</model> are the | ||||||||||||||||||||||||||||||||||||||
| 299 | activation's; C<-o engine=>, C<engine:>, C<model:> in F<.raider.yml>, the | ||||||||||||||||||||||||||||||||||||||
| 300 | table defaults and the C<*_API_KEY> autodetection do not apply. | ||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||
| 302 | =item * L</engine_args> set C<url> to the endpoint's C<base_url>, whatever | ||||||||||||||||||||||||||||||||||||||
| 303 | F<.raider.yml> says. | ||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||
| 305 | =item * L</engine_args> set C<connect_address> to the activation's: the | ||||||||||||||||||||||||||||||||||||||
| 306 | address raider checked for the endpoint host. The engine connects there | ||||||||||||||||||||||||||||||||||||||
| 307 | instead of resolving the name again (Langertha ADR 0037), while C<Host>, | ||||||||||||||||||||||||||||||||||||||
| 308 | TLS SNI and the certificate check stay on the host name; neither C<-o> nor | ||||||||||||||||||||||||||||||||||||||
| 309 | F<.raider.yml> can change it. An activation without one croaks: an | ||||||||||||||||||||||||||||||||||||||
| 310 | unpinned engine is never built in provider mode. The engine is built with | ||||||||||||||||||||||||||||||||||||||
| 311 | its own HTTP clients (none is passed in), so no client is shared with | ||||||||||||||||||||||||||||||||||||||
| 312 | another engine. | ||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||
| 314 | =item * L</api_key> comes only from C<-k> or C<-o api_key=>: never from | ||||||||||||||||||||||||||||||||||||||
| 315 | F<.raider.yml> and never from the environment, and C<api_key> is always | ||||||||||||||||||||||||||||||||||||||
| 316 | passed to the engine (C<undef> without a key), so the engine class does | ||||||||||||||||||||||||||||||||||||||
| 317 | not read its C<LANGERTHA_*_API_KEY> either. A key configured for another | ||||||||||||||||||||||||||||||||||||||
| 318 | provider never reaches this one. | ||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||
| 320 | =item * L</build_engine> turns off redirects on the engine's synchronous | ||||||||||||||||||||||||||||||||||||||
| 321 | user agent, so its requests stay on the endpoint's origin. With the pin, | ||||||||||||||||||||||||||||||||||||||
| 322 | Langertha itself refuses a redirect to another host on every backend, and | ||||||||||||||||||||||||||||||||||||||
| 323 | it keeps the key on its origin; but it follows a redirect on the same host | ||||||||||||||||||||||||||||||||||||||
| 324 | to another port (still pinned, without the key), and raider's rule is the | ||||||||||||||||||||||||||||||||||||||
| 325 | endpoint's origin, not only its address (chat requests are POSTs, which | ||||||||||||||||||||||||||||||||||||||
| 326 | Langertha never redirects). | ||||||||||||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||||||||||||
| 328 | =back | ||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||
| 330 | =head2 engine_name | ||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||
| 332 | Langertha engine class shortcut, passed as C<engine>. Defaults to | ||||||||||||||||||||||||||||||||||||||
| 333 | C<-o engine=>, then to C<engine:> in F<.raider.yml>, then to the first | ||||||||||||||||||||||||||||||||||||||
| 334 | C<*_API_KEY> environment variable found, then to C<'anthropic'>. | ||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||
| 336 | =head2 engine_names | ||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||
| 338 | my @names = $resolver->engine_names; # ('anthropic', 'openai', ...) | ||||||||||||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||||||||||||
| 340 | Every engine name L</engine_class> knows, always in the same order. Also | ||||||||||||||||||||||||||||||||||||||
| 341 | callable on the class. | ||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||
| 343 | =head2 api_key_env_vars | ||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||
| 345 | my @vars = $resolver->api_key_env_vars; # ('ANTHROPIC_API_KEY', ...) | ||||||||||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||||||||
| 347 | The API key environment variables of all L</engine_names>, in that | ||||||||||||||||||||||||||||||||||||||
| 348 | order; engines without one are left out. Also callable on the class. | ||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||
| 350 | =head2 env_var_for_engine | ||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||
| 352 | my $var = $resolver->env_var_for_engine('openai'); # 'OPENAI_API_KEY' | ||||||||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||||||||
| 354 | The environment variable holding the API key of an engine; C<undef> for | ||||||||||||||||||||||||||||||||||||||
| 355 | engines without one (C<ollama>) and unknown ones. Also callable on the | ||||||||||||||||||||||||||||||||||||||
| 356 | class. | ||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||
| 358 | =head2 default_model_for_engine | ||||||||||||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||||||||||||
| 360 | my $model = $resolver->default_model_for_engine('openai'); # 'gpt-4o-mini' | ||||||||||||||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||||||||||||
| 362 | The model an engine uses without an explicit C<-m>: raider's cheap | ||||||||||||||||||||||||||||||||||||||
| 363 | default from the built-in table, or -- for an engine the table does not | ||||||||||||||||||||||||||||||||||||||
| 364 | list -- the engine class's own C<default_model>. C<undef> for an engine | ||||||||||||||||||||||||||||||||||||||
| 365 | that requires an explicit model (e.g. openrouter). For display only; | ||||||||||||||||||||||||||||||||||||||
| 366 | L</model> imposes only the table default, never the engine's own. Also | ||||||||||||||||||||||||||||||||||||||
| 367 | callable on the class. | ||||||||||||||||||||||||||||||||||||||
| 368 | |||||||||||||||||||||||||||||||||||||||
| 369 | =head2 model | ||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||
| 371 | Model identifier the engine is built with. Defaults to C<model> in | ||||||||||||||||||||||||||||||||||||||
| 372 | L</engine_options>, then C<model:> in F<.raider.yml>, then the per-engine | ||||||||||||||||||||||||||||||||||||||
| 373 | cheap default from the built-in table. With no such default the value is | ||||||||||||||||||||||||||||||||||||||
| 374 | empty and L</engine_args> passes no C<model>, so the engine's own | ||||||||||||||||||||||||||||||||||||||
| 375 | C<default_model> applies. An explicit C<model> always wins. | ||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||
| 377 | =head2 has_model | ||||||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||||||
| 379 | True when a non-empty model resolves. False when no C<-m>, C<-o model=>, | ||||||||||||||||||||||||||||||||||||||
| 380 | C<model:> or table default is set, so L</engine_args> leaves C<model> off | ||||||||||||||||||||||||||||||||||||||
| 381 | and the engine falls back to its own C<default_model>. | ||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||
| 383 | =head2 api_key | ||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||
| 385 | API key for the engine. Defaults to C<api_key> in L</engine_options>, then | ||||||||||||||||||||||||||||||||||||||
| 386 | C<api_key:> in F<.raider.yml>, then the engine's environment variable | ||||||||||||||||||||||||||||||||||||||
| 387 | (L</env_var_for_engine>). An explicit C<api_key> always wins. | ||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||
| 389 | =head2 api_key_env | ||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||
| 391 | Name of the environment variable of the current engine's API key, for | ||||||||||||||||||||||||||||||||||||||
| 392 | display; C<undef> for engines without one and with L</provider>. | ||||||||||||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||||||||||||
| 394 | =head2 engine_class | ||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||
| 396 | The L<Langertha> engine class of L</engine_name>. Dies with C<Unknown | ||||||||||||||||||||||||||||||||||||||
| 397 | engine: NAME> for a name it does not know. | ||||||||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||||||||
| 399 | =head2 engine_yml_options | ||||||||||||||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||||||||||||||
| 401 | The engine options of F<.raider.yml> for L</engine_name> | ||||||||||||||||||||||||||||||||||||||
| 402 | (L<Langertha::Raider::Config/engine_options>). | ||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||
| 404 | =head2 cli_engine_options | ||||||||||||||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||||||||||||
| 406 | The C<-o> pairs that go to the engine: L</engine_options> without | ||||||||||||||||||||||||||||||||||||||
| 407 | raider's own keys. | ||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||
| 409 | =head2 engine_args | ||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||
| 411 | my %args = $resolver->engine_args(mcp_servers => \@clients); | ||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||
| 413 | Engine constructor arguments: F<.raider.yml> then C<-o> (C<-o> wins), | ||||||||||||||||||||||||||||||||||||||
| 414 | raider's own keys left out, then C<%extra>. C<model> and C<api_key> go | ||||||||||||||||||||||||||||||||||||||
| 415 | last: L</model> and L</api_key> already resolve flag over C<-o> over | ||||||||||||||||||||||||||||||||||||||
| 416 | F<.raider.yml>, so an explicit C<-m> / C<-k> is never overwritten. | ||||||||||||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||||||||||||
| 418 | =head2 build_engine | ||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||
| 420 | my $engine = $resolver->build_engine(mcp_servers => \@clients); | ||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||
| 422 | Loads L</engine_class> and builds it with L</engine_args>; with | ||||||||||||||||||||||||||||||||||||||
| 423 | L</provider> the engine connects to the checked address and its | ||||||||||||||||||||||||||||||||||||||
| 424 | synchronous user agent follows no redirect. | ||||||||||||||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||||||||||||
| 426 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||
| 428 | =over | ||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||
| 430 | =item * L<Langertha::Raider::Application> | ||||||||||||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||||||||||||
| 432 | =item * L<Langertha::Raider::Config> | ||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||
| 434 | =back | ||||||||||||||||||||||||||||||||||||||
| 435 | |||||||||||||||||||||||||||||||||||||||
| 436 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||
| 437 | |||||||||||||||||||||||||||||||||||||||
| 438 | =head2 Issues | ||||||||||||||||||||||||||||||||||||||
| 439 | |||||||||||||||||||||||||||||||||||||||
| 440 | Please report bugs and feature requests on GitHub at | ||||||||||||||||||||||||||||||||||||||
| 441 | L<https://github.com/Getty/langertha-raider/issues>. | ||||||||||||||||||||||||||||||||||||||
| 442 | |||||||||||||||||||||||||||||||||||||||
| 443 | =head2 IRC | ||||||||||||||||||||||||||||||||||||||
| 444 | |||||||||||||||||||||||||||||||||||||||
| 445 | Join C<#langertha> on C<irc.perl.org> or message Getty directly. | ||||||||||||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||||||||||||
| 447 | =head1 CONTRIBUTING | ||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||
| 449 | Contributions are welcome! Please fork the repository and submit a pull request. | ||||||||||||||||||||||||||||||||||||||
| 450 | |||||||||||||||||||||||||||||||||||||||
| 451 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||||||||||||
| 453 | Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/> | ||||||||||||||||||||||||||||||||||||||
| 454 | |||||||||||||||||||||||||||||||||||||||
| 455 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||||||||||
| 456 | |||||||||||||||||||||||||||||||||||||||
| 457 | This software is copyright (c) 2026 by Torsten Raudssus. | ||||||||||||||||||||||||||||||||||||||
| 458 | |||||||||||||||||||||||||||||||||||||||
| 459 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||||||||||||
| 460 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||||||||||||
| 461 | |||||||||||||||||||||||||||||||||||||||
| 462 | =cut | ||||||||||||||||||||||||||||||||||||||