MooseX...bleFile(3pm)

πŸ“¦
version 0.53 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’Ύ 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 $filename and she's back. 🫢
  • store ($filename) β€” stores it out. give her a $filename and 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. πŸ™‡β€β™€οΈ


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