Group
Extension

Matches 1

Method-Cached ( B/BO/BOXPHERE/Method-Cached-0.051.tar.gz, BOXPHERE, 2009; MetaCPAN )
Method-Cached/lib/Method/Cached/KeyRule/Serialize.pm ( view source; MetaCPAN )
;
use Digest::SHA;
use JSON::XS;
use Storable;

__PACKAGE__->export_rule(qw/SELF_CODED SERIALIZE/);

sub SELF_CODED {
    my ($method_name, $args) = @_;
    our $ENCODER ||= JSON::XS->new->convert_ble
ssed(1);
    local *UNIVERSAL::TO_JSON = sub { Storable::nfreeze \@_ };
    my $json = $ENCODER->encode($args->[0]);
    $args->[0] = Digest::SHA::sha1_base64($json);
    return;
}

sub SERIALIZE {
  
, $args) = @_;
    our $ENCODER ||= JSON::XS->new->convert_blessed(1);
    local $^W = 0;
    local *UNIVERSAL::TO_JSON = sub { Storable::nfreeze \@_ };
    my $json = $ENCODER->encode($args);
    $me

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.