-
-
13 Aug 2020 14:58:11 UTC
- Distribution: BSON
- Module version: v1.12.2
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers
- Kwalitee
Bus factor: 1- 79.73% Coverage
- License: apache_2_0
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (113.14KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 13 contributors-
David Golden
-
Stefan G.
-
Eric Daniels
-
Finn
-
Olivier Duclos
-
Pat Gunn
-
Petr Písař
-
Robert Sedlacek
-
Thomas Bloor
-
Tobias Leich
-
Wallace Reis
-
Yury Zavarin
-
Oleg Kostyuk
- Dependencies
- B
- Carp
- Crypt::URandom
- Exporter
- List::Util
- MIME::Base64
- Math::BigFloat
- Math::BigInt
- Moo
- Scalar::Util
- Sys::Hostname
- Tie::IxHash
- Time::HiRes
- Time::Local
- base
- boolean
- constant
- if
- mro
- namespace::clean
- overload
- re
- strict
- threads::shared
- version
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
BSON::Bytes - BSON type wrapper for binary byte strings
VERSION
version v1.12.2
SYNOPSIS
use BSON::Types ':all'; $bytes = bson_bytes( $bytestring ); $bytes = bson_bytes( $bytestring, $subtype );
DESCRIPTION
This module provides a BSON type wrapper for binary data represented as a string of bytes.
ATTRIBUTES
data
A scalar, interpreted as bytes. (I.e. "character" data should be encoded to bytes.) It defaults to the empty string.
subtype
A numeric BSON subtype between 0 and 255. This defaults to 0 and generally should not be modified. Subtypes 128 to 255 are "user-defined".
METHODS
TO_JSON
Returns Base64 encoded string equivalent to the data attribute.
If the
BSON_EXTJSON
option is true, it will instead be compatible with MongoDB's extended JSON format, which represents it as a document as follows:{"$binary" : { "base64": "<base64 data>", "subType" : "<type>"} }
OVERLOADING
The stringification operator (
""
) is overloaded to return the binary data and fallback overloading is enabled.AUTHORS
David Golden <david@mongodb.com>
Stefan G. <minimalist@lavabit.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
Module Install Instructions
To install BSON, copy and paste the appropriate command in to your terminal.
cpanm BSON
perl -MCPAN -e shell install BSON
For more information on module installation, please visit the detailed CPAN module installation guide.