=cut
+sub inject_resultset_components {
+ my $self = shift;
+ my @components = @{shift @_};
+
+ # this generation of class bit needs to go into CCC
+ my $class = $self->resultset_class . '::' . rand(100);
+ Class::C3::Componentised->inject_base($class, $self->resultset_class);
+ $self->resultset_class($class);
+
+ $self->resultset_class->load_components(@components);
+}
+
1;
relationships
relationship_info
has_relationship
+
+ inject_resultset_components
/) {
no strict qw/refs/;
*{__PACKAGE__."::$method_to_proxy"} = subname $method_to_proxy => sub {
--- /dev/null
+package A::Useless;
+
+1;
-package # hide from PAUSE
+package # hide from PAUSE
DBICTest::Schema::Artist;
use base qw/DBICTest::BaseResult/;
);
__PACKAGE__->many_to_many('artworks', 'artwork_to_artist', 'artwork');
+__PACKAGE__->result_source_instance->inject_resultset_components(['+A::Useless']);
sub sqlt_deploy_hook {
my ($self, $sqlt_table) = @_;
--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest->init_schema;
+
+isa_ok $schema->resultset('Artist'), 'A::Useless', 'Artist RS';
+ok !$schema->resultset('CD')->isa('A::Useless'), 'CD RS is not A::Useless';
+
+done_testing;