perldoc > BSON::Types

πŸ“› NAME

BSON::Types - Helper functions to wrap BSON type classes

πŸš€ Quick Reference

Use CaseCommandDescription
Create 32‑bit integerbson_int32(42)Wraps integer as BSON Int32
Create doublebson_double(3.14)Wraps float as BSON Double
Create Object IDbson_oid()Generates a new unique 12‑byte Object ID
Create current timebson_time()Returns current UTC time (ms precision)
Wrap raw BSONbson_raw($bson)Wraps already‑encoded BSON document
Create booleanbson_bool($expr)Returns BSON boolean (prefer boolean::boolean())

πŸ“Œ VERSION

version v1.12.2

πŸ“œ SYNOPSIS

use BSON::Types ':all';

$int32   = bson_int32(42);
$double  = bson_double(3.14159);
$decimal = bson_decimal("24.01");
$time    = bson_time(); # now
...

πŸ“– DESCRIPTION

This module provides helper functions for BSON type wrappers. Type wrappers use objects corresponding to BSON types to represent data that would have ambiguous type or don't have a native Perl representation

For example, because Perl scalars can represent strings, integers or floating point numbers, the serialization rules depend on various heuristics. By wrapping a Perl scalar with a class, such as BSON::Int32, users can specify exactly how a scalar should serialize to BSON.

πŸ”§ FUNCTIONS

πŸ‘₯ AUTHORS

πŸ“œ 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

BSON::Types
πŸ“› NAME πŸš€ Quick Reference πŸ“Œ VERSION πŸ“œ SYNOPSIS πŸ“– DESCRIPTION πŸ”§ FUNCTIONS πŸ‘₯ AUTHORS πŸ“œ COPYRIGHT AND LICENSE

Generated by phpman v4.9.25-4-g0d844aa · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-07 09:27 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^