MooseX...micFile(3pm)
π NAME π
MooseX::Storage::IO::AtomicFile β bestie, it's literally An Atomic File I/O role β¨
π VERSION π
version 0.53 π«Ά
π¦ SYNOPSIS π¦
okay so picture this: you got a Point class and you want it to save itself to disk without any messy half-written chaos. here's the entire vibe:
package Point;
use Moose;
use MooseX::Storage;
with Storage('format' => 'JSON', 'io' => 'AtomicFile');
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');
like yes, that's it, that's the whole thing, store it and load it and go live your life π
πΈ METHODS πΈ
load ($filename)β bestie reads it back in from$filenameβstore ($filename)β bestie writes it out to$filenameπ₯
π SUPPORT π
ngl if you find a bug (and you might π), you can submit it through the RT bug tracker: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage β or if email is more your thing, hit up bug-MooseX-Storage@rt.cpan.org βοΈ
there's also a mailing list for users of this distribution, over at http://lists.perl.org/list/moose.html π«Ά
and there's an irc channel for users of this distribution too β it's #moose on irc.perl.org (that's irc://irc.perl.org/#moose if you're fancy) π¬
π AUTHORS π
the literal icons who made this:
- 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. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt π
no cap, that's the whole page.
okay bestie that's a wrap β this was MooseX::Storage::IO::AtomicFile from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2022-10-16. go forth and be atomic β¨π¦π
π¦ 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