return $self->{$set} = $val;
}
+sub get_component_class {
+ my ($self, $get) = @_;
+ if (ref $self) {
+ return $self->{$get};
+ } else {
+ $get = "_$get";
+ return $self->can($get) ? $self->$get : undef;
+ }
+}
+
+sub set_component_class {
+ my ($self, $set, $val) = @_;
+ eval "require $val";
+ if (ref $self) {
+ return $self->{$set} = $val;
+ } else {
+ $set = "_$set";
+ return $self->can($set) ? $self->$set($val) : $self->mk_classdata($set => $val);
+ }
+}
+
1;
=head1 AUTHORS
__PACKAGE__->load_components(qw/AccessorGroup/);
__PACKAGE__->mk_group_accessors('simple' =>
- qw/_ordered_columns _columns _primaries _unique_constraints name resultset_class resultset_attributes result_class schema from _relationships/);
+ qw/_ordered_columns _columns _primaries _unique_constraints name resultset_attributes schema from _relationships/);
+__PACKAGE__->mk_group_accessors('component_class' => qw/resultset_class result_class/);
=head1 NAME
use warnings;
use base qw/DBIx::Class::ResultSourceProxy/;
-use DBIx::Class::ResultSource::Table;
+__PACKAGE__->load_components(qw/AccessorGroup/);
-__PACKAGE__->mk_classdata('table_alias'); # FIXME: Doesn't actually do anything yet!
+__PACKAGE__->mk_group_accessors('component_class' => 'table_class');
+__PACKAGE__->table_class('DBIx::Class::ResultSource::Table');
-__PACKAGE__->mk_classdata('table_class' => 'DBIx::Class::ResultSource::Table');
+__PACKAGE__->mk_classdata('table_alias'); # FIXME: Doesn't actually do anything yet!
=head1 NAME