weight::VERSION = '1.03';
use 5.006;
use JSON 2.00 (); # works with JSON::XS
use Moose::Role;
use namespace::autoclean;
use Scalar::Util ();
my $JSON = JSON->new->utf8->canonical;
our %INSTANCES;
| ref( $args[0] ) ne 'HASH' )
? $class->BUILDARGS(@args)
: $args[0];
return $JSON->encode($args);
}
1;
__END__
=pod
=head1 NAME
MooseX::Role::Flyweight - Automatically memoiz