-
-
17 Mar 2018 15:28:07 UTC
- Distribution: Mango
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (969 / 100 / 64)
- Kwalitee
Bus factor: 5- 39.92% Coverage
- License: artistic_2
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (49.88KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Mojolicious
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Mango::BSON::Binary - Binary type
SYNOPSIS
use Mango::BSON::Binary; my $bin = Mango::BSON::Binary->new(data => $bytes, type => 'generic'); say $bin->data;
DESCRIPTION
Mango::BSON::Binary is a container for the BSON binary type used by Mango::BSON. For
JSON
implementations like Mojo::JSON, that support theTO_JSON
method, it will automaticallyBase64
encode the binary data.ATTRIBUTES
Mango::BSON::Binary implements the following attributes.
data
my $bytes = $bin->data; $bin = $bin->data($bytes);
Binary data.
type
my $type = $bin->type; $bin = $bin->type('generic');
Binary subtype.
METHODS
Mango::BSON::Binary inherits all methods from Mojo::Base and implements the following new ones.
TO_JSON
my $b64 = $bin->TO_JSON;
Base64 encode "data".
OPERATORS
Mango::BSON::Binary overloads the following operators.
bool
my $bool = !!$bin;
Always true.
stringify
my $str = "$bin";
Alias for "data".
SEE ALSO
Module Install Instructions
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm Mango
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.