Mango::BSON::ObjectID - Object ID type
use Mango::BSON::ObjectID; my $oid = Mango::BSON::ObjectID->new('1a2b3c4e5f60718293a4b5c6'); say $oid->to_epoch;
Mango::BSON::ObjectID is a container for the BSON object id type used by Mango::BSON.
Mango::BSON::ObjectID inherits all methods from Mojo::Base and implements the following new ones.
my $oid = Mango::BSON::ObjectID->new; my $oid = Mango::BSON::ObjectID->new('1a2b3c4e5f60718293a4b5c6');
Construct a new scalar-based Mango::BSON::ObjectID object.
my $epoch = $oid->to_epoch;
Extract epoch seconds from object id.
Mango, Mojolicious::Guides, http://mojolicio.us.
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.