diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-05-07 17:37:50 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-05-07 17:37:50 +0000 |
commit | 6f39e2d485713321d06bf67088315414cefe2090 (patch) | |
tree | 74d2361f62c5e7bdacdf873bdc16a90d5f6308b1 /lib/Reaction/InterfaceModel | |
parent | 504e2c4437db6f0962d28334a7e2db036a1deaad (diff) | |
download | reaction-6f39e2d485713321d06bf67088315414cefe2090.tar.gz reaction-6f39e2d485713321d06bf67088315414cefe2090.zip |
no reason for member_type to build lazily, it should be required
Diffstat (limited to 'lib/Reaction/InterfaceModel')
-rw-r--r-- | lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm b/lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm index b2a0685..7b82176 100644 --- a/lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm +++ b/lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm @@ -14,7 +14,14 @@ role Base, which { isa => 'DBIx::Class::ResultSet', ); - has 'member_type' => (is => 'ro', isa => 'ClassName', lazy_build => 1); + has 'member_type' => ( + is => 'rw', + isa => 'ClassName', + required => 1, + builder => '_build_member_type', + clearer => 'clear_member_type', + predicate => 'has_member_type', + ); #implements BUILD => as { @@ -43,7 +50,7 @@ role Base, which { implements clone => as { my $self = shift; - my $rs = $self->_source_resultset->search_rs({}); + my $rs = $self->_source_resultset; #->search_rs({}); #should the clone include the arrayref of IM::Objects too? return (blessed $self)->new( _source_resultset => $rs, |