GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MANGO::BSON::OBJECTID (3)

.ds Aq ’

NAME

Mango::BSON::ObjectID - Object ID type

CONTENTS

SYNOPSIS



  use Mango::BSON::ObjectID;

  my $oid = Mango::BSON::ObjectID->new(1a2b3c4e5f60718293a4b5c6);
  say $oid->to_epoch;



DESCRIPTION

Mango::BSON::ObjectID is a container for the BSON object id type used by Mango::BSON.

METHODS

Mango::BSON::ObjectID inherits all methods from Mojo::Base and implements the following new ones.

    from_epoch



  my $oid = $oid->from_epoch(1359840145);



Generate new object id with specific epoch time.

    new



  my $oid = Mango::BSON::ObjectID->new;
  my $oid = Mango::BSON::ObjectID->new(1a2b3c4e5f60718293a4b5c6);



Construct a new Mango::BSON::ObjectID object.

    to_bytes



  my $bytes = $oid->to_bytes;



Object id in binary form.

    to_epoch



  my $epoch = $oid->to_epoch;



Extract epoch seconds from object id.

    to_string



  my $str = $oid->to_string;



Stringify object id.

OPERATORS

Mango::BSON::ObjectID overloads the following operators.

    bool



  my $bool = !!$oid;



Always true.

    stringify



  my $str = "$oid";



Alias for to_string.

SEE ALSO

Mango, Mojolicious::Guides, <http://mojolicio.us>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MANGO::BSON::OBJECTID (3) 2016-02-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.