Group
Extension

Matches 1

MongoDB-Async ( N/NY/NYAKNYAN/MongoDB-Async-0.702.3.tar.gz, NYAKNYAN, 2014; MetaCPAN )
MongoDB-Async/lib/MongoDB/Async/OID.pm ( view source; MetaCPAN )

*to_string = \&value;



sub get_time {
    return hex(substr($_[0]->{value}, 0, 8));
}


sub TO_JSON { {'$oid' => $_[0]->{value}} }

use overload
    '""' => \&to_string,
    'fallback' => 1;


1;

he timestamp.  

=head2 TO_JSON

    my $json = JSON->new;
    $json->allow_blessed;
    $json->convert_blessed;

    $json->encode(MongoDB::Async::OID->new);

Returns a JSON string for this OID.  Thi
s is compatible with the strict JSON
representation used by MongoDB, that is, an OID with the value 
"012345678901234567890123" will be represented as 
C<{"$oid" : "012345678901234567890123"}>.

=head

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