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 {
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,
implements _build_computed_field_order => as {
my ($self) = @_;
- confess("current_collection lacks a value for 'member_type' attribute")
- unless $self->current_collection->has_member_type;
my %excluded = map { $_ => undef } @{ $self->excluded_fields };
#treat _$field_name as private and exclude fields with no reader
my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name }