NAME
Aion::Format::Yaml - converter from/to yaml
SYNOPSIS
use Aion::Format::Yaml qw/from_yaml to_yaml/;
to_yaml {foo => 'bar'} # -> "foo: bar\n"
from_yaml "a: b" # --> {a => "b"}
DESCRIPTION
Converts from/to yaml. Under the hood it uses YAML::Syck, customized to Aion's requirements.
SUBROUTINES
to_yaml ($struct)
In yaml.
to_yaml {foo => undef} # => foo: ~\n
to_yaml {foo => 'true'} # => foo: 'true'\n
from_yaml ($string)
From yaml.
Boolean values:
y|Y|yes|Yes|YES|n|N|no|No|NO|
true|True|TRUE|false|False|FALSE|
on|On|ON|off|Off|OFF
from_yaml "a: true" # --> {a => 1}
from_yaml "a: yes" # --> {a => 1}
from_yaml "a: y" # --> {a => 1}
from_yaml "a: ON" # --> {a => 1}
from_yaml "a: FALSE" # --> {a => ""}
from_yaml "a: No" # --> {a => ""}
from_yaml "a: N" # --> {a => ""}
from_yaml "a: off" # --> {a => ""}
AUTHOR
Yaroslav O. Kosmina mailto:dart@cpan.org
LICENSE
⚖ GPLv3
COPYRIGHT
The Aion::Format::Yaml module is copyright © 2025 Yaroslav O. Kosmina. Rusland. All rights reserved.