1 package DBIx::Class::ResultSourceHandle;
7 use base qw/DBIx::Class/;
10 # on some RH perls the following line causes serious performance problem
11 # see https://bugzilla.redhat.com/show_bug.cgi?id=196836
12 q/""/ => sub { __PACKAGE__ . ":" . shift->source_moniker; },
15 __PACKAGE__->mk_group_accessors('simple' => qw/schema source_moniker/);
19 DBIx::Class::ResultSourceHandle
23 This module removes fixed link between Rows/ResultSets and the actual source
24 objects, which gets round the following problems
30 Needing to keep C<$schema> in scope, since any objects/result_sets
31 will have a C<$schema> object through their source handle
35 Large output when using Data::Dump(er) since this class can be set to
36 stringify to almost nothing
40 Closer to being able to do a Serialize::Storable that doesn't require class-based connections
51 my ($class, $data) = @_;
53 $class = ref $class if ref $class;
60 Resolve the moniker into the actual ResultSource object
64 sub resolve { return $_[0]->schema->source($_[0]->source_moniker) }
66 =head2 STORABLE_freeze
73 my ($self, $cloning) = @_;
74 my $to_serialize = { %$self };
75 delete $to_serialize->{schema};
76 return (Storable::freeze($to_serialize));
86 my ($self, $cloning,$ice) = @_;
87 %$self = %{ Storable::thaw($ice) };