|
NAMEMango::BSON::Binary - Binary typeSYNOPSISuse Mango::BSON::Binary; my $bin = Mango::BSON::Binary->new(data => $bytes, type => 'generic'); say $bin->data; DESCRIPTIONMango::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.ATTRIBUTESMango::BSON::Binary implements the following attributes.datamy $bytes = $bin->data; $bin = $bin->data($bytes); Binary data. typemy $type = $bin->type; $bin = $bin->type('generic'); Binary subtype. METHODSMango::BSON::Binary inherits all methods from Mojo::Base and implements the following new ones.TO_JSONmy $b64 = $bin->TO_JSON; Base64 encode "data". OPERATORSMango::BSON::Binary overloads the following operators.boolmy $bool = !!$bin; Always true. stringifymy $str = "$bin"; Alias for "data". SEE ALSOMango, Mojolicious::Guides, <http://mojolicio.us>.
Visit the GSP FreeBSD Man Page Interface. |