YAML::P...:Binary(3)
π NAME π
ok so this is YAML::PP::Schema::Binary β the schema for loading and binary data. that's it, that's the whole vibe. it handles binary stuff so you don't have to π
β¨ SYNOPSIS β¨
bestie, here's how you actually use it:
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
like, both of those blobs are literally the same tiny arrow gif. iconic. πΉ
πΈ DESCRIPTION πΈ
ok so head over to <https://yaml.org/type/binary.html> if you want the deep lore, but here's the tea:
when you prepend a base64 encoded binary string with the "!!binary" tag, it gets automatically decoded when loading. literally magic. β¨
warning bestie: the logic for dumping is probably broken π see <https://github.com/perlpunk/YAML-PP-p5/issues/28> for the receipts.
suggestions welcome! fr fr, if you know how to fix it, speak up π«Ά
π METHODS π
register
called by YAML::PP::Schema. that's the whole job. main character energy honestly π
k byeee, this page came from perl v5.42.0, dated 2026-04-24 β catch you on the flip side of YAML::P...:Binary(3) ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-YAML-PP 0.40.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms