MooseX...ection(3pm)
β¨ 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 π«Ά
π 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.
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
- 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