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