# ABSTRACT: Add TO_JSON to your packages without the boilerplate
package Package::JSONable;
{
$Package::JSONable::VERSION = '0.001';
}
use strict;
use warnings;
use Scalar::Util qw(reftype);
use Ca
qw(croak);
use List::MoreUtils qw(none);
use JSON ();
sub import {
my ( $class, %import_opts ) = @_;
my ( $target ) = caller;
my $to_json = sub {
my ( $self, %opts ) = @_;
if ( $value ) {
$hash{$method} = JSON::true;
}
else {
$hash{$method} = JSON::false;
}
}
}