« blib/lib/DBIO/Test/MooCakeSchema/ResultSet/Artist.pm
↑ Summary
blib/lib/DBIO/Test/Conformance/Cases/Diff.pm »
| 1 | package DBIO::Test::MooSchema::ResultSet::Artist; | ||
| 2 | # ABSTRACT: Custom Moo-based ResultSet for the artist source | ||
| 3 | |||
| 4 | 3 | our $VERSION = '0.900007'; | |
| 5 | |||
| 6 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 3 | extends 'DBIO::ResultSet'; | |
| 8 | |||
| 9 | # For Moo extending a non-Moo class: pass constructor args through unchanged. | ||
| 10 | # DBIO::ResultSet::new takes ($result_source, \%attrs) — no filtering needed. | ||
| 11 | 1 | ▶ | sub FOREIGNBUILDARGS { my ($class, @args) = @_; return @args } |
|
Subroutine
FOREIGNBUILDARGS: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 12 | |||
| 13 | # ResultSet-level Moo attribute | ||
| 14 | 1 | ▶ | has default_limit => ( is => 'rw', lazy => 1, default => sub { 100 } ); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 0 | ▶ | sub by_name { |
|
Subroutine
by_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 17 | 0 | my ($self, $name) = @_; | |
| 18 | 0 | return $self->search({ name => $name }); | |
| 19 | } | ||
| 20 | |||
| 21 | 0 | ▶ | sub order_by_name { |
|
Subroutine
order_by_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | 0 | return $_[0]->search({}, { order_by => { -asc => 'name' } }); | |
| 23 | } | ||
| 24 | |||
| 25 | 3 | 1; | |
| 26 | |||
| 27 | __END__ | ||