this module provides a simple way to store and retrieve it in common serialization
formats (e.g. JSON/YAML/MessagePack). Storing this information in this manner
allows for easy retrieval and use in d
warnings;
use Carp;
use Data::MessagePack;
use File::Basename;
use File::Spec;
use JSON qw (encode_json decode_json);
use YAML::Tiny;
use Exporter qw(import);
our @EXPORT_OK = qw(store_modifications
},
json => {
decode => sub {
my ($mod_fname) = @_;
open my $infile_fh, '<', $mod_fname
or die "Could not open file: $!";
my $json = do {
local $/; <$infile_fh> };
close $infile_fh;
return decode_json($json);
},
encode => sub {
my ( $mod_HoH_ref, $mod_fname ) = @_;