MooseX...bleFile(3pm)
πΎ NAME πΎ
MooseX::Storage::IO::StorableFile β bestie, it's literally a Storable File I/O role. That's the whole vibe. π
(Yes, the page header calls it MooseX...bleFile(3pm) and tags it as User Contributed Perl Documentation β that's just the man page being β¨abbreviatedβ¨, it's the same module, don't panic.)
πΈ VERSION πΈ
version 0.53 β she's serving, she's stable, she's iconic. π
β¨ SYNOPSIS β¨
okay so here's the whole thing in action, no cap:
package Point;
use Moose;
use MooseX::Storage;
with Storage('io' => 'StorableFile');
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');
my $p2 = Point->load('my_point');
see how easy that was?? you store it, you load it, you move on with your life. main character energy fr fr. π¦
π DESCRIPTION π
This module will load and store Moose classes using Storable. And the way it does that β it uses Storable::nstore by default, so your stuff can just vibe across different machines, or honestly just locally, whatever works for you. π
One important thing to note, bestie, and I need you to listen: this module does not mix well with the other Format modules. Like, at all. Not its fault, not their fault β it's just that Storable serializes perl data structures in its own format, so those roles are largely unnecessary. Different strokes, different lanes. π
However!! There is always the possibility that having a set of freeze/thaw hooks can be useful, so because of that, this module will attempt to use freeze or thaw if that method is available. π
red alert, red alert: you should be careful when doing this because it could lead to all sorts of hairy issues. But you have been warned. π«Ά (consider yourself warned. warned and loved.)
π§ METHODS π§
Two methods. Two. That's it. That's the whole menu:
load ($filename)β loads it up. give it a$filenameand she's back. π«Άstore ($filename)β stores it out. give her a$filenameand it's saved. πΎ
π SUPPORT π
Bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage> β or, if email is more your thing, send them to <bug-MooseX-Storage@rt.cpan.org> (that's bug-MooseX-Storage@rt.cpan.org). π
There's also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>. π¬
And there's also an irc channel available for users of this distribution β #moose on irc.perl.org, which you can find at <irc://irc.perl.org/#moose>. come hang out, we're nice, i promise. π
π AUTHORS π
- Chris Prather <chris.prather@iinteractive.com>
- Stevan Little <stevan.little@iinteractive.com>
- ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman) <nothingmuch@woobling.org>
absolute legends, every single one. bow down. πββοΈ
π 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, honestly. π
okay that's the whole page, bestie β this was MooseX::Storage::IO::StorableFile, shipped as part of the User Contributed Perl Documentation, sitting at perl v5.36.0, dated 2022-10-16. go forth and serialize responsibly. πβ¨π¦πΈ
π¦ 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