NAME
Luv::CLI::Registry - local cache of the awesome-love2d library list
VERSION
version 0.001
SYNOPSIS
my $registry = Luv::CLI::Registry->new(cache_path => $path);
$registry->refresh;
my @matches = $registry->search('input');
my $entry = $registry->find('baton');
DESCRIPTION
Parses the awesome-love2d README into a structured index of libraries, caches it locally as JSON, and serves name/description searches from that cache rather than re-fetching on every lookup.
NAME
Luv::CLI::Registry - local cache of the awesome-love2d library list
METHODS
cache_path()
Returns the path to the local cache file.
load()
Loads entries from the cache file, if present.
save()
Writes the current entries to the cache file as JSON.
cache_dir()
Returns the directory containing the cache file.
is_stale($max_age_seconds)
Returns true if the cache file is missing or older than $max_age_seconds (default one week).
add_entry($name, %info)
Adds or replaces an entry in the in-memory index. %info may include url, category, and description.
search($term)
Returns a list of entries whose name or description matches $term (case-insensitive).
find($name)
Returns the entry for $name (case-insensitive), or undef.
parse_readme($markdown)
Parses awesome-love2d-style markdown into entries, populating the in-memory index.
refresh()
Fetches the current awesome-love2d README, parses it, and saves the result to the cache. Returns the number of entries indexed.
AUTHOR
Nobunaga <nobunaga@cpan.org>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Nobunaga <nobunaga@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Ogun.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.