$rs = $cd->related_resultset('tracks'); # has_many relationship
$rs = $cd->tracks;
-This is the recommended way to transverse through relationships, based
+This is the recommended way to traverse through relationships, based
on the L</accessor> name given in the relationship definition.
This will return either a L<Result|DBIx::Class::Manual::ResultClass> or a
=cut
sub count_related {
- my $self = shift;
- return $self->search_related(@_)->count;
+ shift->search_related(@_)->count;
}
=head2 new_related
=cut
sub find_related {
- my $self = shift;
- my $rel = shift;
- return $self->search_related($rel)->find(@_);
+ #my ($self, $rel, @args) = @_;
+ return shift->search_related(shift)->find(@_);
}
=head2 find_or_new_related
=cut
sub update_or_create_related {
- my $self = shift;
- my $rel = shift;
- return $self->related_resultset($rel)->update_or_create(@_);
+ #my ($self, $rel, @args) = @_;
+ shift->related_resultset(shift)->update_or_create(@_);
}
=head2 set_from_related
=item Arguments: $rel_name, $cond?, L<\%attrs?|DBIx::Class::ResultSet/ATTRIBUTES>
-=item Return Value: $storage_rv
+=item Return Value: $underlying_storage_rv
=back