X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSerialize%2FStorable.pm;h=2a295d3ba1d248a4895f2585b70854ea90c9bfa1;hb=a9697bd06f21230c6c98cbade589374103d16a0e;hp=9ba4f6d257f50f474df46b55344c81127b752f51;hpb=26148d36e66d7f7c67863cea8d6501739b765692;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Serialize/Storable.pm b/lib/DBIx/Class/Serialize/Storable.pm index 9ba4f6d..2a295d3 100644 --- a/lib/DBIx/Class/Serialize/Storable.pm +++ b/lib/DBIx/Class/Serialize/Storable.pm @@ -1,16 +1,20 @@ package DBIx::Class::Serialize::Storable; use strict; use warnings; -use Storable; + +use Storable(); +use DBIx::Class::Carp; +use namespace::clean; + +carp 'The Serialize::Storable component is now *DEPRECATED*. It has not ' + .'been providing any useful functionality for quite a while, and in fact ' + .'destroys prefetched results in its current implementation. Do not use!'; + sub STORABLE_freeze { my ($self, $cloning) = @_; my $to_serialize = { %$self }; - # The source is either derived from _source_handle or is - # reattached in the thaw handler below - delete $to_serialize->{result_source}; - # Dynamic values, easy to recalculate delete $to_serialize->{$_} for qw/related_resultsets _inflated_column/; @@ -21,10 +25,6 @@ sub STORABLE_thaw { my ($self, $cloning, $serialized) = @_; %$self = %{ Storable::thaw($serialized) }; - - # if the handle went missing somehow, reattach - $self->result_source($self->result_source_instance) - if !$self->_source_handle && $self->can('result_source_instance'); } 1; @@ -35,6 +35,12 @@ __END__ DBIx::Class::Serialize::Storable - hooks for Storable nfreeze/thaw +=head1 DEPRECATION NOTE + +This component is now B. It has not been providing any useful +functionality for quite a while, and in fact destroys prefetched results +in its current implementation. Do not use! + =head1 SYNOPSIS # in a table class definition @@ -47,8 +53,8 @@ __END__ =head1 DESCRIPTION -This component adds hooks for Storable so that row objects can be -serialized. It assumes that your row object class (C) is +This component adds hooks for Storable so that result objects can be +serialized. It assumes that your result object class (C) is the same as your table class, which is the normal situation. =head1 HOOKS @@ -67,9 +73,9 @@ method. The deserializing hook called on the object during deserialization. -=head1 AUTHORS +=head1 AUTHOR AND CONTRIBUTORS -David Kamholz +See L and L in DBIx::Class =head1 LICENSE