Group
Extension

Matches 1

Dist-Zilla-Plugin-For-DefHash-Examples ( P/PE/PERLANCAR/Dist-Zilla-Plugin-For-DefHash-Examples-0.001.tar.gz, PERLANCAR, 2016; MetaCPAN )
Dist-Zilla-Plugin-For-DefHash-Examples/lib/Dist/Zilla/Plugin/For/DefHash/Examples.pm ( view source; MetaCPAN )
read_text);
use Hash::DefHash;
use JSON::MaybeXS;

sub munge_files {
    no strict 'refs';

    my $self = shift;

    find sub {
        return unless -f && /\.json\z/;
        my $ct = read_text $_;

        my $hash;
        eval { $hash = decode_json($ct) };
        $self->log_fatal(["File %s doesn't contain a valid JSON: %s", "$File::Find::dir/$_", $@])
            if $@;
        my $defhash;
s>). Currently it does the following:

=over

=item * For C<share/examples/*.json>, check that the file contains valid JSON and valid defhash (or invalid defhash, if filename begins with 'error-')

=b

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.