GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mango::BSON::Binary(3) User Contributed Perl Documentation Mango::BSON::Binary(3)

Mango::BSON::Binary - Binary type

  use Mango::BSON::Binary;

  my $bin = Mango::BSON::Binary->new(data => $bytes, type => 'generic');
  say $bin->data;

Mango::BSON::Binary is a container for the BSON binary type used by Mango::BSON. For "JSON" implementations like Mojo::JSON, that support the "TO_JSON" method, it will automatically "Base64" encode the binary data.

Mango::BSON::Binary implements the following attributes.

  my $bytes = $bin->data;
  $bin      = $bin->data($bytes);

Binary data.

  my $type = $bin->type;
  $bin     = $bin->type('generic');

Binary subtype.

Mango::BSON::Binary inherits all methods from Mojo::Base and implements the following new ones.

  my $b64 = $bin->TO_JSON;

Base64 encode "data".

Mango::BSON::Binary overloads the following operators.

  my $bool = !!$bin;

Always true.

  my $str = "$bin";

Alias for "data".

Mango, Mojolicious::Guides, <http://mojolicio.us>.
2018-03-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.