5.016;
our $VERSION = '0.04';
use strict;
use warnings;
use File::Basename;
use File::Spec;
use JSON::PP;
# TODO: '?' sigil for '#' and '$' restricted targets
# TODO: Set '$_' in Perl and shell sub
dir, $_) } @files;
}
sub _read_json {
my ($self, $file) = @_;
open my $fh, '<', $file
or die "Failed to open $file for reading: $!\n";
my $json = do { local $/ = undef; <$fh> }
;
close $fh;
my $ref = decode_json($json);
unless (ref $ref eq 'HASH') {
die "Invalid .stubb.json\n";
}
if ($self->{ Defaults } and ref $ref->{ defaults } eq 'HASH') {