Sup - Something related to Erlang's OTP
use Sup;
class Cache does GenServer {
has %.data;
method get(Str() $key) is callable {
%!data{$key}
}
method delete(Str() $key) is callable {
%!data{$key}:delete
}
method set(Str() $key, \value) is castable {
%!data{$key} = value
}
}
supervisor { Cache.new }Sup is something related to Erlang's OTP
Fernando Corrêa de Oliveira fco@cpan.org
Copyright 2025 Fernando Corrêa de Oliveira
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.