MooseX...ialize(3pm)
π¦ MooseX::Storage::Meta::Attribute::DoNotSerialize π
okay bestie so this is a page from the User Contributed Perl Documentation collection, and the star of the show is MooseX::Storage::Meta::Attribute::DoNotSerialize β no cap, it's a whole custom meta-attribute whose entire job is to bypass serialization. she's a rebel, she's an icon, she does not want to be packed up and shipped out. π
β¨ NAME β¨
MooseX::Storage::Meta::Attribute::DoNotSerialize β a custom meta-attribute that lets you bypass serialization. literally her whole personality. π
πΈ VERSION πΈ
version 0.53 β that's the one, bestie.
π«Ά SYNOPSIS π«Ά
here's the vibe, copy-paste away:
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');
has 'foo' => (
metaclass => 'DoNotSerialize',
is => 'rw',
isa => 'CodeRef',
);
1;
see how x and y are just out here living their best life, but foo is lowkey like "not me, I'm not getting serialized"? yeah. that's the energy. β¨
π DESCRIPTION π
so sometimes β and hear me out β you simply do not want a particular attribute to be part of the serialization. like, it's not invited to the party, it doesn't get a plus-one, it stays home. π«π¦
in that case, bestie, you want to make sure that attribute uses this custom meta-attribute. See the SYNOPSIS for a nice example that can be easily cargo-culted. yes, cargo-culted. go ahead, steal it, I won't tell anyone. π
π SUPPORT π
found a bug? first of all, iconic of you for caring π β bugs may be submitted through the RT bug tracker:
or by email at:
bug-MooseX-Storage@rt.cpan.orgβ<mailto:bug-MooseX-Storage@rt.cpan.org>
there is also a mailing list available for users of this distribution, at:
there is also an irc channel available for users of this distribution, at #moose on irc.perl.org:
<irc://irc.perl.org/#moose>
come hang out, the group chat is cute. π«Ά
π AUTHORS π
these absolute legends made it happen:
- 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. β¨ slay, legally speaking.
k thanks for coming to my ted talk, now go forth and not serialize that attribute. main character energy only. π
so yeah β that was MooseX::Storage::Meta::Attribute::DoNotSerialize, documented under perl v5.36.0, dated 2022-10-16. mwah, bye bestie! π¦πΈπ
π¦ 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