MooseX...ection(3pm)

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

✨ NAME ✨

MooseX::Storage::Traits::DisableCycleDetection β€” bestie, this is a custom trait that lets you bypass cycle detection πŸ’…

It lives in the MooseX::Storage family, and it's a 3pm page (Perl module docs, user contributed, iykyk).


πŸŽ€ VERSION πŸŽ€

version 0.53 β€” yes, that's the one, periodt.


🌸 SYNOPSIS 🌸

package Double;
use Moose;
use MooseX::Storage;
with Storage( traits => ['DisableCycleDetection'] );

has 'x' => ( is => 'rw', isa => 'HashRef' );
has 'y' => ( is => 'rw', isa => 'HashRef' );

my $ref = {};

my $double = Double->new( 'x' => $ref, 'y' => $ref );

$double->pack;

Like, look at that. Two attributes pointing at the same hashref and pack still goes through. Iconic. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea: MooseX::Storage has a lil primitive check for circular references. The thing is, it also goes off on super simple cases β€” literally the ones in the SYNOPSIS up there. Not a bug, just how it is. πŸ™ˆ

So, if you slap the DisableCycleDetection trait on, it disables checks for any cyclical references. Which means: if you know what you're doing, you can bypass this check. If you don't know what you're doing… bestie, maybe sit this one out. 😭

Heads up: this trait gets applied to all objects that inherit from it. So it's an all-in situation on that class tree.

Wanna do it on a per-case basis instead? Then go look at "disable_cycle_check" in MooseX::Storage::Basic. Per-case, per-vibe. 🫢

And yeah, the SYNOPSIS is there for you to easily cargo-cult. Take it, run with it, no shame. πŸ‘‘


🌈 SUPPORT 🌈

Bugs? Yeah, they happen. Submit them through the RT bug tracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage> β€” or email <bug-MooseX-Storage@rt.cpan.org> βœ‰οΈ

There's also a mailing list for peeps using this distribution, right here: <http://lists.perl.org/list/moose.html>

And there's an irc channel too, for users of this distribution: "#moose" on "irc.perl.org" β†’ <irc://irc.perl.org/#moose> πŸ’¬


πŸ‘‘ AUTHORS πŸ‘‘

  • Chris Prather <chris.prather@iinteractive.com>
  • Stevan Little <stevan.little@iinteractive.com>
  • Χ™Χ•Χ‘Χœ Χ§Χ•Χ’'מן (Yuval Kogman) <nothingmuch@woobling.org>

The literal icons who made this 🫢


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.


And that's the whole page, bestie β€” no notes, we ate. πŸ“ This was served up by perl v5.36.0, dated 2022-10-16, straight from the MooseX::Storage::Traits::DisableCycleDetection 3pm manual in the User Contributed Perl Documentation collection. Stan. β­πŸ¦‹πŸ’…

πŸ“¦ where this page comes from