| 1 | # ABSTRACT: Common queries for Distributions | ||||||||||||
| 2 | |||||||||||||
| 3 | 63 | ▶ | use utf8; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | package Pinto::Schema::ResultSet::Distribution; | ||||||||||||
| 6 | |||||||||||||
| 7 | 63 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 63 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 63 | ▶ | use base 'DBIx::Class::ResultSet'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | #------------------------------------------------------------------------------ | ||||||||||||
| 13 | |||||||||||||
| 14 | 63 | our $VERSION = '0.14'; # VERSION | |||||||||||
| 15 | |||||||||||||
| 16 | #------------------------------------------------------------------------------ | ||||||||||||
| 17 | |||||||||||||
| 18 | 66 | ▶ | sub with_packages { | ||||||||||
|
Subroutine
with_packages: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||
| 19 | 66 | my ( $self, $where ) = @_; | |||||||||||
| 20 | |||||||||||||
| 21 | 66 | ▶ | return $self->search( $where || {}, { prefetch => 'packages' } ); | ||||||||||
|
Condition50%1/2
$where || {}
MC/DC0%0/1
$where || {}
$where
Truth table50%1/2
A
A= $where
| |||||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | #------------------------------------------------------------------------------ | ||||||||||||
| 25 | |||||||||||||
| 26 | 61 | ▶ | sub find_by_author_archive { | ||||||||||
|
Subroutine
find_by_author_archive: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 27 | 61 | my ( $self, $author, $archive ) = @_; | |||||||||||
| 28 | |||||||||||||
| 29 | 61 | my $where = { author => $author, archive => $archive }; | |||||||||||
| 30 | 61 | my $attrs = { key => 'author_archive_unique' }; | |||||||||||
| 31 | |||||||||||||
| 32 | 61 | return $self->find( $where, $attrs ); | |||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | #------------------------------------------------------------------------------ | ||||||||||||
| 36 | 63 | 1; | |||||||||||
| 37 | |||||||||||||
| 38 | __END__ | ||||||||||||