ext::BEM::Instance;
use Template;
use File::ShareDir qw/module_dir dist_dir/;
use Path::Tiny;
use JSON::XS;
our $VERSION = version->new('0.1.1');
extends 'Data::Context';
has '+action_class' => (
}
sub json {
my ($self, $block) = @_;
my $json = eval { JSON::XS->new->utf8->relaxed->shrink->encode($block); };
if ($@) {
$json = qq/{error:"$@"}/;
}
return $json;
}
su
e log file
=head3 C<class ($block)>
Returns the classes for a block.
=head3 C<json ($block)>
Returns the block JSON encoded
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPEND