MooseX...ialize(3pm)

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

πŸ¦‹ 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>

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