NAME
Skilletor::Source::Local - A source read straight from a local directory (author mode)
VERSION
version 0.001
SYNOPSIS
use Skilletor::Source::Local;
my $src = Skilletor::Source::Local->new( local_path => '~/dev/skills', home => $ENV{HOME} );
my $loc = $src->resolve; # { dir => '/home/me/dev/skills', version => 'local' }
DESCRIPTION
The reference's sources/local.ts (spec §4.4): a directory read directly, no fetch and no cache. The version is always local and "check" always says changed, so every run re-renders it. A missing directory is no error until "resolve": "exists" lets the caller fall back to the source's git or url.
local_path
The path as configured; a leading ~ is expanded when "home" is given. Without home the path is taken as is.
home
Stands in for ~ in "local_path".
dir
The directory read.
expand_home
$src->expand_home( '~/dev', '/home/me' ); # /home/me/dev
exists
True when "dir" is a directory.
resolve
{ dir, version => 'local' }; throws Skilletor::Error::Source for a missing directory.
cached
"resolve": a local source needs no network (the offline call the git and url backends have too).
check
Always true: a local source is re-rendered every run.
SUPPORT
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; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.