'Tie::IxHash' => 0,
'Module::Find' => 0,
'Storable' => 0,
+ 'Class::Data::Accessor' => 0.01,
# Following for CDBICompat only
'Class::Trigger' => 0,
'DBIx::ContextualFetch' => 0,
use warnings;
use vars qw($VERSION);
-use base qw/DBIx::Class::Componentised Class::Data::Inheritable/;
+use base qw/DBIx::Class::Componentised Class::Data::Accessor/;
+
+sub mk_classdata { shift->mk_classaccessor(@_); }
$VERSION = '0.0499_01';
__PACKAGE__->load_components(qw/
InflateColumn
Relationship
- ResultSetInstance
PK
Row
Table
+ ResultSetInstance
Exception
AccessorGroup/);
use base qw/DBIx::Class/;
-sub search { shift->resultset->search(@_); }
-sub search_literal { shift->resultset->search_literal(@_); }
-sub count { shift->resultset->count(@_); }
-sub count_literal { shift->resultset->count_literal(@_); }
+sub search { shift->resultset_instance->search(@_); }
+sub search_literal { shift->resultset_instance->search_literal(@_); }
+sub count { shift->resultset_instance->count(@_); }
+sub count_literal { shift->resultset_instance->count_literal(@_); }
+
+__PACKAGE__->mk_classdata('resultset_instance');
1;
$class->_mk_column_accessors(@cols);
}
-sub resultset {
+sub resultset_instance {
my $class = shift;
+ $class->next::method($class->construct_resultset);
+}
+sub construct_resultset {
+ my $class = shift;
my $rs_class = $class->_resultset_class;
eval "use $rs_class;";
- my $rs = $rs_class->new($class, @_);
+ return $rs_class->new($class);
}
=item search_like
package main;
Actor->iterator_class('Class::DBI::My::Iterator');
+Actor->resultset_instance(Actor->construct_resultset);
{
my @acts = $film->actors->slice(1, 2);