Dist-Conformance

 view release on metacpan or  search on metacpan

lib/Dist/Conformance/Snapshot/Tree.pm  view on Meta::CPAN

    my %blobs    = ( 'CLAUDE.md' => "Load perl-slop:reading-perl first.\n" );
    my $snapshot = Dist::Conformance::Snapshot::Tree->new(
        paths => { map { $_ => Dist::Conformance::Snapshot::blob_sha( $blobs{$_} ) } keys %blobs },
        fetch => sub ($path) { $blobs{$path} },
    );

=head1 DESCRIPTION

A snapshot of a repository that is not on this machine.  The caller gives the
listing of a git tree and a sub that fetches the content of one path, for
example from the recursive tree and the contents endpoints of a forge's API.
The checks then fetch only the files that they read.

This snapshot is not writable, so an update cannot run on it.

=head1 ATTRIBUTES

=head2 paths

Required.  A hash reference from each path to its git blob SHA.  A recursive
git tree gives these as the C<path> and the C<sha> of each C<blob> entry.



( run in 1.069 second using v1.01-cache-2.11-cpan-eb134014566 )