YAML::PP::Schema::Binary(3) User Contributed Perl Documentation YAML::PP::Schema::Binary(3)

# [NAME](#NAME)

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

# [SYNOPSIS](#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](#DESCRIPTION)

See &lt;https://yaml.org/type/binary.html&gt;

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 &lt;https://github.com/perlpunk/YAML-PP-p5/issues/28&gt;.

Suggestions welcome.

# [METHODS](#METHODS)

[register](#register)

Called by YAML::PP::Schema

2026-10-13 perl v5.44.0

---

Document: YAML::PP::Schema::Binary(3pm) from perl-yaml-pp 0.43.0-r0 (Chainguard OS)
Source: https://github.com/perlpunk/YAML-PP-p5.git
