1YAML::PP::Schema::BinarUys(e3r)Contributed Perl DocumentYaAtMiLo:n:PP::Schema::Binary(3)
2
3
4

NAME

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

SYNOPSIS

9           use YAML::PP;
10           my $yp = YAML::PP->new( schema => [qw/ + Binary /] );
11           # or
12
13           my ($binary, $same_binary) = $yp->load_string(<<'EOM');
14           --- !!binary "\
15             R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\
16             OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\
17             +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\
18             AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
19           --- !!binary |
20             R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
21             OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
22             +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
23             AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
24           # The binary value above is a tiny arrow encoded as a gif image.
25           EOM
26

DESCRIPTION

28       See <https://yaml.org/type/binary.html>
29
30       By prepending a base64 encoded binary string with the "!!binary" tag,
31       it can be automatically decoded when loading.
32
33       Note that the logic for dumping is probably broken, see
34       <https://github.com/perlpunk/YAML-PP-p5/issues/28>.
35
36       Suggestions welcome.
37

METHODS

39       register
40           Called by YAML::PP::Schema
41
42
43
44perl v5.36.0                      2022-10-03       YAML::PP::Schema::Binary(3)
Impressum