1BSON::Int32(3) User Contributed Perl Documentation BSON::Int32(3)
2
3
4
6 BSON::Int32 - BSON type wrapper for Int32
7
9 version v1.12.2
10
12 use BSON::Types ':all';
13
14 bson_int32( $number );
15
17 This module provides a BSON type wrapper for a numeric value that would
18 be represented in BSON as a 32-bit integer.
19
20 If the value won't fit in a 32-bit integer, an error will be thrown.
21
23 value
24 A numeric scalar. It will be coerced to an integer. The default is 0.
25
27 TO_JSON
28 Returns the value as an integer.
29
30 If the "BSON_EXTJSON" environment variable is true and the
31 "BSON_EXTJSON_RELAXED" environment variable is false, returns a hashref
32 compatible with MongoDB's extended JSON
33 <https://github.com/mongodb/specifications/blob/master/source/extended-
34 json.rst> format, which represents it as a document as follows:
35
36 {"$numberInt" : "42"}
37
39 The numification operator, "0+" is overloaded to return the "value",
40 the full "minimal set" of overloaded operations is provided (per
41 overload documentation) and fallback overloading is enabled.
42
44 • David Golden <david@mongodb.com>
45
46 • Stefan G. <minimalist@lavabit.com>
47
49 This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.
50
51 This is free software, licensed under:
52
53 The Apache License, Version 2.0, January 2004
54
55
56
57perl v5.34.0 2022-01-20 BSON::Int32(3)