MooseX...rialize(3pm)

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

πŸ’– NAME πŸ’–

MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize β€” it's a custom meta-attribute-trait that lets you bypass serialization, bestie πŸ¦‹


✨ VERSION ✨

version 0.53 β€” she's giving vintage but she works πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, copy-paste ready, no notes:

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' => (
    traits => [ 'DoNotSerialize' ],
    is     => 'rw',
    isa    => 'CodeRef',
);

1;

look at foo go 🫢 β€” she's an attribute with traits => [ 'DoNotSerialize' ] and she simply will not be participating in the serialization. main character refusal energy, honestly πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so like. sometimes you have an attribute and you're just like… no. not this one. not in the serialization πŸ™ˆ and that's valid. when that's the vibe, you make that attribute use this custom meta-attribute-trait, and boom β€” she's excluded.

lowkey the SYNOPSIS up there is a perfectly good example to cargo-cult fr fr, so if you want the full picture, go look at it πŸ‘€

πŸŽ€ SUPPORT πŸŽ€

need help? got bugs? we got you, bestie:


πŸ‘‘ AUTHORS πŸ‘‘

these are the icons who made it happen, give them their flowers πŸ’

  • 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 πŸ’–


and that's the whole page!! this doc shipped as part of perl v5.36.0 and the date on it is 2022-10-16 β€” so yeah, vintage, but make it fashion ✨ go forth and not-serialize things, bestie πŸ¦‹

πŸ“¦ where this page comes from