YAML::PP::Schema::Binary(3pm)

NAME
YAML::PP::Schema::Binary - Schema for loading and binary data

SYNOPSIS
    use YAML::PP;
    my $yp = YAML::PP->new( schema => [qw/ + Binary /] );
    # or

    my ($binary, $same_binary) = $yp->load_string(<<'EOM');
    --- !!binary "\
      R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\
      OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\
      +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\
      AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
    --- !!binary |
      R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
      OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
      +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
      AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
    # The binary value above is a tiny arrow encoded as a gif image.
    EOM

DESCRIPTION
See <https://yaml.org/type/binary.html>

By prepending a base64 encoded binary string with the "!!binary" tag, it can be automatically decoded when loading.

Note that the logic for dumping is probably broken, see <https://github.com/perlpunk/YAML-PP-p5/issues/28>.

Suggestions welcome.

METHODS

register
    Called by YAML::PP::Schema