| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package # hide form PAUSE |
|
2
|
|
|
|
|
|
|
DBIx::Class::CDBICompat::AbstractSearch; |
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
2360
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
54
|
|
|
5
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
49
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
9
|
use base 'DBIx::Class'; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
441
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
DBIx::Class::CDBICompat::AbstractSearch - Emulates Class::DBI::AbstractSearch |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
See DBIx::Class::CDBICompat for usage directions. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Emulates L. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# The keys are mostly the same. |
|
24
|
|
|
|
|
|
|
my %cdbi2dbix = ( |
|
25
|
|
|
|
|
|
|
limit => 'rows', |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub search_where { |
|
29
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
|
30
|
0
|
0
|
|
|
|
|
my $where = (ref $_[0]) ? $_[0] : { @_ }; |
|
31
|
0
|
0
|
|
|
|
|
my $attr = (ref $_[0]) ? $_[1] : {}; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# Translate the keys |
|
34
|
0
|
|
|
|
|
|
$attr->{$cdbi2dbix{$_}} = delete $attr->{$_} for keys %cdbi2dbix; |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return $class->resultset_instance->search($where, $attr); |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 FURTHER QUESTIONS? |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Check the list of L. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This module is free software L |
|
46
|
|
|
|
|
|
|
by the L. You can |
|
47
|
|
|
|
|
|
|
redistribute it and/or modify it under the same terms as the |
|
48
|
|
|
|
|
|
|
L. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |