MooseX...O::File(3pm)
π NAME π
MooseX::Storage::IO::File β a whole entire basic File I/O role, bestie. That's it, that's the gig. It's the lil' plugin that lets your Moose classes save themselves to disk and load themselves back, no cap. π
Oh and hey, if you're staring at the manpage header going "what is MooseX...O::File??" β that's just the truncated terminal title, it's the User Contributed Perl Documentation version of this page. The actual module is the full name up there. π
β¨ VERSION β¨
version 0.53</p> π¦ (iconic, vintage, we love a little time capsule)
πΈ SYNOPSIS πΈ
okay so like. here's the whole vibe. you with the role, you get store and load, and your object can just. exist on your filesystem. main character energy fr fr:
package Point;
use Moose;
use MooseX::Storage;
with Storage('format' => 'JSON', 'io' => 'File');
has 'x' => (is => 'rw', isa => 'Int');
has 'y' => (is => 'rw', isa => 'Int');
1;
my $p = Point->new(x => 10, y => 10);
## methods to load/store a class
## on the file system
$p->store('my_point.json');
my $p2 = Point->load('my_point.json');
note the little ## comments up there β those are straight from the original, I'm not touching them, they're part of the lore. π
π«Ά METHODS π«Ά
two methods. that's it. two. and they carry this whole module on their backs, obsessed with them honestly. π
load ($filename)β pull a whole object back up out of a file. You hand it a filename, it hands you your class back. resurrection but make it Perl. πstore ($filename)β write your object down into a file. You hand it a filename, it goes and saves itself there. bye bestie, see you on disk. πΎβ¨
π¦ SUPPORT π¦
found a bug? yeah it happens, don't panic, we got you π
- Bugs may be submitted through the RT bug tracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage>
- or, if you'd rather email it straight in:
bug-MooseX-Storage@rt.cpan.org<mailto:bug-MooseX-Storage@rt.cpan.org> - There's also a mailing list for users of this distribution, chilling at: <http://lists.perl.org/list/moose.html>
- and there's an IRC channel too, for users of this distribution:
#mooseonirc.perl.org<irc://irc.perl.org/#moose>
fr fr come say hi in #moose, the people there are genuinely so nice and they know EVERYTHING π
π AUTHORS π
give it up for the originators, the founding mothers/fathers of this whole thing, absolute legends, no notes π
- Chris Prather
<chris.prather@iinteractive.com> - Stevan Little
<stevan.little@iinteractive.com> - ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman)
<nothingmuch@woobling.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2007 by Infinity Interactive, Inc. 2007!! a whole legend β¨
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in go wild, just respect the Perl 5 terms, okay? periodt. π
okay that's the page bestie, you're officially educated, go store something π
sign-off time: this was perl v5.36.0, dated 2022-10-16, and the manpage title it lives under is MooseX...O::File(3pm) β because terminal headers have zero chill and truncate everything. mwah. ππ
π¦ 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