X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FTraits%2FDisableCycleDetection.pm;h=b72ae0bb110f2009cad12f75ccaa0f75b04b432a;hb=a0e1d53870bae0dadd952d358040aeddebc9310e;hp=a8fb9bd8ce35094192d800fa24dad40d24195958;hpb=59abaf70d6f2f724a1a895f0d07cceb2a7aaeb87;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Traits/DisableCycleDetection.pm b/lib/MooseX/Storage/Traits/DisableCycleDetection.pm index a8fb9bd..b72ae0b 100644 --- a/lib/MooseX/Storage/Traits/DisableCycleDetection.pm +++ b/lib/MooseX/Storage/Traits/DisableCycleDetection.pm @@ -1,7 +1,7 @@ package MooseX::Storage::Traits::DisableCycleDetection; use Moose::Role; -our $VERSION = '0.18'; +our $VERSION = '0.31'; our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; @@ -21,6 +21,8 @@ around 'unpack' => sub { $self->$orig($data, %args); }; +no Moose::Role; + 1; __END__ @@ -38,17 +40,16 @@ MooseX::Storage::Traits::DisableCycleDetection - A custom trait to bypass cycle 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; - - + =head1 DESCRIPTION C implements a primitive check for circular references. @@ -73,7 +74,7 @@ See the SYNOPSIS for a nice example that can be easily cargo-culted. =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. @@ -91,3 +92,4 @@ This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut +