1BSON::Int64(3) User Contributed Perl Documentation BSON::Int64(3)
2
3
4
6 BSON::Int64 - BSON type wrapper for Int64
7
9 version v1.12.2
10
12 use BSON::Types ':all';
13
14 bson_int64( $number );
15
17 This module provides a BSON type wrapper for a numeric value that would
18 be represented in BSON as a 64-bit integer.
19
20 If the value won't fit in a 64-bit integer, an error will be thrown.
21
22 On a Perl without 64-bit integer support, the value must be a
23 Math::BigInt object.
24
26 value
27 A numeric scalar. It will be coerced to an integer. The default is 0.
28
30 TO_JSON
31 On a 64-bit perl, returns the value as an integer. On a 32-bit Perl,
32 it will be returned as a Math::BigInt object, which will fail to
33 serialize unless a "TO_JSON" method is defined for that or in package
34 "universal".
35
36 If the "BSON_EXTJSON" environment variable is true and the
37 "BSON_EXTJSON_RELAXED" environment variable is false, returns a hashref
38 compatible with MongoDB's extended JSON
39 <https://github.com/mongodb/specifications/blob/master/source/extended-
40 json.rst> format, which represents it as a document as follows:
41
42 {"$numberLong" : "223372036854775807"}
43
45 The numification operator, "0+" is overloaded to return the "value",
46 the full "minimal set" of overloaded operations is provided (per
47 overload documentation) and fallback overloading is enabled.
48
50 · David Golden <david@mongodb.com>
51
52 · Stefan G. <minimalist@lavabit.com>
53
55 This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.
56
57 This is free software, licensed under:
58
59 The Apache License, Version 2.0, January 2004
60
61
62
63perl v5.32.0 2020-08-18 BSON::Int64(3)