BSON::Binary - Binary data for BSON
use BSON; my $bin = BSON::Binary->new([1,2,3,4,5,0x67,0x89], 0);
This module is needed for BSON and it manages BSON's binary element.
Main constructor which takes two parameters: An array reference with binary data and a data type. A string may also be passed as the first parameter, in which case it will be converted to an array ref.
my $bin = BSON::Binary->new("classic\x20string\0", 0);
The different types are described in the BSON specification. A type is one of the following:
0x00 Binary / Generic 0x01 Function 0x02 Binary (Old) 0x03 UUID 0x05 MD5 0x80 User defined
Returns an array reference to the contents of the binary data.
Returns the type of the binary data per the BSON specification.
This software is Copyright (c) 2015 by minimalist and MongoDB, Inc..
This is free software, licensed under:
The Apache License, Version 2.0, January 2004