1 package DBIx::Class::ResultSourceHandle;
7 use base qw/DBIx::Class/;
10 q/""/ => sub { __PACKAGE__ . ":" . shift->source_moniker; },
13 __PACKAGE__->mk_group_accessors('simple' => qw/schema source_moniker/);
17 DBIx::Class::ResultSourceHandle
21 This module removes fixed link between Rows/ResultSets and the actual source
22 objects, which gets round the following problems
28 Needing to keep C<$schema> in scope, since any objects/result_sets
29 will have a C<$schema> object through their source handle
33 Large output when using Data::Dump(er) since this class can be set to
34 stringify to almost nothing
38 Closer to being aboe to do a Serialize::Storable that doesn't require class-based connections
49 my ($class, $data) = @_;
51 $class = ref $class if ref $class;
58 Resolve the moniker into the actual ResultSource object
62 sub resolve { return $_[0]->schema->source($_[0]->source_moniker) }
65 my ($self, $cloning) = @_;
66 my $to_serialize = { %$self };
67 delete $to_serialize->{schema};
68 return (Storable::freeze($to_serialize));
72 my ($self, $cloning,$ice) = @_;
73 %$self = %{ Storable::thaw($ice) };