| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: Common queries for Registrations |
|
2
|
|
|
|
|
|
|
|
|
3
|
54
|
|
|
54
|
|
54627
|
use utf8; |
|
|
54
|
|
|
|
|
141
|
|
|
|
54
|
|
|
|
|
329
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Pinto::Schema::ResultSet::Registration; |
|
6
|
|
|
|
|
|
|
|
|
7
|
54
|
|
|
54
|
|
2107
|
use strict; |
|
|
54
|
|
|
|
|
129
|
|
|
|
54
|
|
|
|
|
1194
|
|
|
8
|
54
|
|
|
54
|
|
302
|
use warnings; |
|
|
54
|
|
|
|
|
125
|
|
|
|
54
|
|
|
|
|
1494
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
54
|
|
|
54
|
|
261
|
use base 'DBIx::Class::ResultSet'; |
|
|
54
|
|
|
|
|
120
|
|
|
|
54
|
|
|
|
|
15495
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.13'; # VERSION |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub with_package { |
|
19
|
34
|
|
|
34
|
0
|
10495
|
my ( $self, $where ) = @_; |
|
20
|
|
|
|
|
|
|
|
|
21
|
34
|
|
50
|
|
|
309
|
return $self->search( $where || {}, { prefetch => 'package' } ); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub with_distribution { |
|
27
|
34
|
|
|
34
|
0
|
17440
|
my ( $self, $where ) = @_; |
|
28
|
|
|
|
|
|
|
|
|
29
|
34
|
|
50
|
|
|
352
|
return $self->search( $where || {}, { prefetch => 'distribution' } ); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub with_revision { |
|
35
|
0
|
|
|
0
|
0
|
0
|
my ( $self, $where ) = @_; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
0
|
|
|
0
|
return $self->search( $where || {}, { revision => 'distribution' } ); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub as_hash { |
|
43
|
34
|
|
|
34
|
0
|
57584
|
my ( $self, $cb ) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
34
|
|
50
|
0
|
|
151
|
$cb ||= sub { return ( $_[0]->id => $_[0] ) }; |
|
|
0
|
|
|
|
|
0
|
|
|
46
|
34
|
|
|
|
|
178
|
my %hash = map { $cb->($_) } $self->all; |
|
|
45
|
|
|
|
|
57350
|
|
|
47
|
|
|
|
|
|
|
|
|
48
|
34
|
50
|
|
|
|
15958
|
return wantarray ? %hash : \%hash; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding UTF-8 |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=for :stopwords Jeffrey Ryan Thalhammer |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Pinto::Schema::ResultSet::Registration - Common queries for Registrations |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 VERSION |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
version 0.13 |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Jeffrey Ryan Thalhammer <jeff@stratopan.com> |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Jeffrey Ryan Thalhammer. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
79
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |