BSON::Array β BSON type wrapper for a list of elements
| Use Case | Command | Description |
|---|---|---|
| Create a BSON array | bson_array(1, 2, 3) | Wrap a list into a BSON array π¦ |
| Get Perl arrayref | $array->value | Obtain the underlying list reference π |
| Dereference directly | @{$array} | Use the object as an array ποΈ |
| Check the type | ref $array eq 'BSON::Array' | Verify it is a BSON array π |
version v1.12.2
use BSON::Types ':all';
my $array = bson_array(...);
This module provides a BSON type wrapper representing a list of elements π§©. It is currently readβonly π.
Wrapping is usually not necessary as an ordinary array reference is usually sufficient. This class is helpful for cases where an array reference could be ambiguously interpreted as a topβlevel document container π·οΈ.
π 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
Generated by phpman v4.9.25-4-g0d844aa · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-07 09:08 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format