Data::Keys::E::Value::InfDef - inflate/deflate values
use Date::Keys; my $dk = Data::Keys->new( 'base_dir' => '/folder/full/of/json/files', 'extend_with' => ['Store::Dir', 'Value::InfDef'], 'inflate' => sub { JSON::Util->decode($_[0]) }, 'deflate' => sub { JSON::Util->encode($_[0]) }, ); my %data = %{$dk->get('abcd.json')}; $dk->set('abcd.json', \%data);
Uses callback to automatically inflate and deflate.
Callback executed with get value.
get
Callback executed with set value.
set
Jozef Kutej
To install Data::Keys, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Keys
CPAN shell
perl -MCPAN -e shell install Data::Keys
For more information on module installation, please visit the detailed CPAN module installation guide.