-
-
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::Code - BSON type wrapper for Javascript code
VERSION
version v1.12.2
SYNOPSIS
use BSON::Types ':all'; $code = bson_code( $javascript ); $code = bson_code( $javascript, $scope );
DESCRIPTION
This module provides a BSON type wrapper for the "Javascript code" type and the "Javascript with Scope" BSON types.
ATTRIBUTES
code
A string containing Javascript code. Defaults to the empty string.
scope
An optional hash reference containing variables in the scope of
code
. Defaults toundef
.METHODS
length
Returns the length of the
code
attribute.TO_JSON
If the
BSON_EXTJSON
option is true, returns a hashref compatible with MongoDB's extended JSON format, which represents it as a document as follows:{"$code" : "<code>"} {"$code" : "<code>", "$scope" : { ... } }
If the
BSON_EXTJSON
option is false, an error is thrown, as this value can't otherwise be represented in JSON.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.