From: Peter Rabbitson Date: Sat, 25 Dec 2010 03:52:21 +0000 (+0100) Subject: Deprecate DBIx::Class::Serialize::Storable (all functionality is in ResultSourceHandle) X-Git-Tag: v0.08125~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=1b6fe47d369e84831a8a881813a53cca68694e72 Deprecate DBIx::Class::Serialize::Storable (all functionality is in ResultSourceHandle) --- diff --git a/Changes b/Changes index d14c03c..4d54a76 100644 --- a/Changes +++ b/Changes @@ -16,6 +16,8 @@ Revision history for DBIx::Class - Add full INSERT...RETURNING support for Oracle - Deprecate use of -nest in search conditions (warn once per callsite) + - Deprecate the completely useless DBIx::Class::Serialize::Storable + result component * Fixes - Fixed read-only attribute set attempt in ::Storage::Replicated diff --git a/lib/DBIx/Class/Manual/Component.pod b/lib/DBIx/Class/Manual/Component.pod index ac94adb..dfa9f94 100644 --- a/lib/DBIx/Class/Manual/Component.pod +++ b/lib/DBIx/Class/Manual/Component.pod @@ -82,8 +82,6 @@ Check out the L docs for more information about inheritance. These components provide extra functionality beyond basic functionality that you can't live without. -L - Hooks for Storable nfreeze/thaw. - L - Class::DBI Compatibility layer. L - Build forms with multiple interconnected objects. diff --git a/lib/DBIx/Class/ResultSourceHandle.pm b/lib/DBIx/Class/ResultSourceHandle.pm index e39bfbc..474c9a4 100644 --- a/lib/DBIx/Class/ResultSourceHandle.pm +++ b/lib/DBIx/Class/ResultSourceHandle.pm @@ -39,10 +39,6 @@ will have a C<$schema> object through their source handle Large output when using Data::Dump(er) since this class can be set to stringify to almost nothing -=item * - -Closer to being able to do a Serialize::Storable that doesn't require class-based connections - =back =head1 METHODS diff --git a/lib/DBIx/Class/Serialize/Storable.pm b/lib/DBIx/Class/Serialize/Storable.pm index 9ba4f6d..bceb1b1 100644 --- a/lib/DBIx/Class/Serialize/Storable.pm +++ b/lib/DBIx/Class/Serialize/Storable.pm @@ -3,6 +3,13 @@ use strict; use warnings; use Storable; +use Carp::Clan qw/^DBIx::Class/; + +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 }; @@ -35,6 +42,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 diff --git a/xt/podcoverage.t b/xt/podcoverage.t index bd788a5..68165cb 100644 --- a/xt/podcoverage.t +++ b/xt/podcoverage.t @@ -134,6 +134,7 @@ my $exceptions = { 'SQL::Translator::*' => { skip => 1 }, # deprecated / backcompat stuff + 'DBIx::Class::Serialize::Storable' => { skip => 1 }, 'DBIx::Class::CDBICompat*' => { skip => 1 }, 'DBIx::Class::ResultSetManager' => { skip => 1 }, 'DBIx::Class::DB' => { skip => 1 },