isa => 'DBIx::Class::ResultSet',
);
- has '_im_class' => (
- is => 'ro',
- isa => 'Str',
- lazy_build => 1,
- );
+ has 'member_type' => (is => 'ro', isa => 'ClassName', lazy_build => 1);
+
#implements BUILD => as {
# my $self = shift;
# unless $self->_im_class->can("inflate_result");
#};
+
+
#Oh man. I have a bad feeling about this one.
- implements _build__im_class => as {
+ implements _build_member_type => as {
my $self = shift;
my $class = blessed($self) || $self;
$class =~ s/::Collection$//;
implements _build__collection_store => as {
my $self = shift;
- my $im_class = $self->_im_class;
- [ $self->_source_resultset->search({}, {result_class => $im_class})->all ];
+ [ $self->_source_resultset->search({}, {result_class => $self->member_type})->all ];
};
implements clone => as {
#should the clone include the arrayref of IM::Objects too?
return (blessed $self)->new(
_source_resultset => $rs,
- _im_class => $self->_im_class, @_
+ member_type => $self->member_type, @_
);
};
my $rs = $self->_source_resultset->page(@_);
return (blessed $self)->new(
_source_resultset => $rs,
- _im_class => $self->_im_class,
+ member_type => $self->member_type,
);
};
Required, Read-only. Contains the L<DBIx::Class::ResultSet> used to populate the
collection.
-=head2 _im_class
+=head2 member_type
Read-only, lazy_build. The name of the IM Object Class that the resultset inside this
-collection will inflate to. Predicate: C<_has_im_class>
+collection will inflate to. Predicate: C<has_member_type>
=head1 METHODS