1 package MooseX::Storage::Traits::DisableCycleDetection;
5 our $AUTHORITY = 'cpan:STEVAN';
15 MooseX::Storage::Traits::DisableCycleDetection - A custom trait to bypass cycle detection
23 with Storage( traits => ['DisableCycleDetection'] );
25 has 'x' => ( is => 'rw', isa => 'HashRef' );
26 has 'y' => ( is => 'rw', isa => 'HashRef' );
30 my $double = Double->new( 'x' => $ref, 'y' => $ref );
37 C<MooseX::Storage> implements a primitive check for circular references.
38 This check also triggers on simple cases as shown in the Synopsis.
39 Providing the C<DisableCycleDetection> traits disables checks for any cyclical
40 references, so if you know what you are doing, you can bypass this check.
42 This trait is applied to all objects that inherit from it. To use this
43 on a per-case basis, see C<disable_cycle_check> in L<MooseX::Storage::Basic>.
45 See the SYNOPSIS for a nice example that can be easily cargo-culted.
59 All complex software has bugs lurking in it, and this module is no
60 exception. If you find a bug please either email me, or add the bug
65 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
67 =head1 COPYRIGHT AND LICENSE
69 Copyright 2007-2008 by Infinity Interactive, Inc.
71 L<http://www.iinteractive.com>
73 This library is free software; you can redistribute it and/or modify
74 it under the same terms as Perl itself.