NAME

Dist::Conformance::Source - Where the standards come from: the flavor files and the templates

VERSION

version 0.002

SYNOPSIS

use 5.040;
use Dist::Conformance::Source::Directory;

my $source = Dist::Conformance::Source::Directory->new( directory => '/bogus/standards', path => 'skills/packaging-perl' );
my $flavor_text = $source->file('conformance/troglodyne.yml');

DESCRIPTION

A source is a directory tree of standards: flavor files under conformance/, and the templates that they name, at any path the flavor chooses. This class is the interface. Dist::Conformance builds one of its two implementations from the source key of .conformance.yml:

Dist::Conformance::Source::Git

{ git => URL, ref => REF, path => PATH }. A git repository, fetched into a cache directory.

Dist::Conformance::Source::Directory

{ directory => DIR, path => PATH }. A directory on this machine, read as it is. It works offline, and the tests use it.

In both, path is the directory inside the tree that holds conformance/. Every path that a flavor names, such as a template, is relative to it. "THE STANDARDS REPOSITORY" in Dist::Conformance::Flavor describes the layout.

ATTRIBUTES

path

The directory inside the tree that the standards start from. Default the top of the tree.

METHODS

root

The directory of the whole tree, as a Mojo::File. A subclass must implement it.

describe

A short description of the source for a message, such as the URL and the ref. A subclass must implement it.

base

The directory that "path" names, as a Mojo::File.

file

($relative). The bytes of the file at $relative below "base". Dies when there is no such file, and on an absolute path or a path with a .. component.

exists_file

($relative). Whether "file" would find $relative.

WRITING A SOURCE

Subclass this module and implement "root" and "describe". "root" is the place to fetch, because every read goes through it.

SEE ALSO

Please see those modules/websites for more information related to this module.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/Troglodyne-Internet-Widgets/Dist-Conformance/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHORS

Current Maintainers:

  • George S. Baugh <george@troglodyne.net>

COPYRIGHT AND LICENSE

Copyright (c) 2026 Troglodyne LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.