1 package MooseX::Storage::Engine::Trait::DisableCycleDetection;
4 around 'check_for_cycle_in_collapse' => sub {
5 my ($orig, $self, $attr, $value) = @_;
6 # See NOTE in MX::Storage::Engine
14 MooseX::Storage::Engine::Trait::DisableCycleDetection - A custom trait to bypass cycle detection
21 with Storage( traits => ['DisableCycleDetection'] );
23 has 'x' => ( is => 'rw', isa => 'HashRef' );
24 has 'y' => ( is => 'rw', isa => 'HashRef' );
28 my $double = Double->new( 'x' => $ref, 'y' => $ref );
34 C<MooseX::Storage> implements a primitive check for circular references.
35 This check also triggers on simple cases as shown in the Synopsis.
36 Providing the C<DisableCycleDetection> traits disables checks for any cyclical
37 references, so if you know what you are doing, you can bypass this check.
39 This trait is applied to an instance of L<MooseX::Storage::Engine>, for the
40 user-visible version shown in the SYNOPSIS, see L<MooseX::Storage::Traits::DisableCycleDetection>
54 All complex software has bugs lurking in it, and this module is no
55 exception. If you find a bug please either email me, or add the bug
60 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
62 =head1 COPYRIGHT AND LICENSE
64 Copyright 2007-2008 by Infinity Interactive, Inc.
66 L<http://www.iinteractive.com>
68 This library is free software; you can redistribute it and/or modify
69 it under the same terms as Perl itself.