MooseX...t::YAML(3pm)
π NAME π
MooseX::Storage::Format::YAML β it's a YAML serialization role, bestie. That's the whole vibe. π
β¨ VERSION β¨
version 0.53 π
π¦ SYNOPSIS π¦
okay so here's the whole entire moment, no cap:
package Point;
use Moose;
use MooseX::Storage;
with Storage('format' => 'YAML');
has 'x' => (is => 'rw', isa => 'Int');
has 'y' => (is => 'rw', isa => 'Int');
1;
my $p = Point->new(x => 10, y => 10);
## methods to freeze/thaw into
## a specified serialization format
## (in this case YAML)
# pack the class into a YAML string
$p->freeze();
# ----
# __CLASS__: "Point"
# x: 10
# y: 10
# unpack the JSON string into a class
my $p2 = Point->thaw(<<YAML);
----
__CLASS__: "Point"
x: 10
y: 10
YAML
(and yes the comment really does say JSON in a YAML doc, the source said it, I said it, we're all saying it, moving on π)
πΈ METHODS πΈ
freezeβ packs the class into a YAML string π«Άthaw ($yaml)β takes a YAML string and unpacks it back into a class, $yaml being the thing you feed it β¨
π«Ά SUPPORT π«Ά
Found a bug? First of all, iconic of you for caring. File it through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage> β or you can email it straight to bug-MooseX-Storage@rt.cpan.org π
There's also a mailing list for everyone using this distribution, living at <http://lists.perl.org/list/moose.html> π
And there's an irc channel too, for users of this distribution, at #moose on irc.perl.org <irc://irc.perl.org/#moose> β come hang, fr fr π¬
π AUTHORS π
- Chris Prather
<chris.prather@iinteractive.com> - Stevan Little
<stevan.little@iinteractive.com> - ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman)
<nothingmuch@woobling.org>
three absolute legends, we love to see it β
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2007 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, that's the whole license situation π
and that's the page, bestie!! π this was perl v5.36.0, dated 2022-10-16, from the MooseX...t::YAML(3pm) corner of the user-contributed perl documentation universe. go forth and serialize your little hearts out π¦β¨
π¦ where this page comes from
- ubuntu noble: libmoosex-storage-perl 0.53-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-storage-perl 0.53-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-storage-perl 0.53-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms