line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::DBI::Plugin::AccessionSearch; |
2
|
1
|
|
|
1
|
|
52964
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
456
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
6
|
use base qw/Class::DBI::Plugin/; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2095
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub accession : Plugged { |
9
|
0
|
|
|
0
|
1
|
0
|
my($pkg, $where, $attrs) = @_; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
0
|
my $param = { |
12
|
|
|
|
|
|
|
pkg => $pkg, |
13
|
|
|
|
|
|
|
where => $where, |
14
|
|
|
|
|
|
|
attrs => $attrs, |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
bless $param , __PACKAGE__; |
18
|
1
|
|
|
1
|
|
10961
|
} |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub accession_search : Plugged { |
21
|
0
|
|
|
0
|
1
|
|
my ($self, $where, $attrs) = @_; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
0
|
|
|
|
$where ||= {}; |
24
|
0
|
|
0
|
|
|
|
$attrs ||= {}; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
0
|
|
|
|
my $our_where = $self->{where} || {}; |
27
|
0
|
|
|
|
|
|
my $new_where = { %{$our_where} , %{$where} }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
0
|
|
|
|
my $our_atters = $self->{attrs} || {}; |
30
|
0
|
|
|
|
|
|
my $new_attrs = { %{$our_atters} , %{$attrs} }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$self->{where} = $new_where; |
33
|
0
|
|
|
|
|
|
$self->{attrs} = $new_attrs; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $self->{pkg}->search_where($new_where,$new_attrs); |
36
|
1
|
|
|
1
|
|
445
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Class::DBI::Plugin::AccessionSearch - easliy add search atters. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This documentation refers to Class::DBI::Plugin::AccessionSearch version 0.02 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
package Your::Data; |
50
|
|
|
|
|
|
|
use base 'Class::DBI'; |
51
|
|
|
|
|
|
|
use Class::DBI::AccessionSearch; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
in your script: |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
use Your::Data; |
56
|
|
|
|
|
|
|
my $d = Your::Data->accession({status => 'ok'}); |
57
|
|
|
|
|
|
|
$d->accession_search({sex => 'male'}); |
58
|
|
|
|
|
|
|
$d->accession_search({status => 'ng'}); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 Methods |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 accession |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
create Class::DBI::AccessionSearch object. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 accession_search |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
search_where's wrapper. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Atsushi Kobayashi, C<< >> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
77
|
|
|
|
|
|
|
C, or through the web interface at |
78
|
|
|
|
|
|
|
L. |
79
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
80
|
|
|
|
|
|
|
your bug as I make changes. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
perldoc Class::DBI::Plugin::AccessionSearch |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
You can also look for information at: |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=over 4 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * CPAN Ratings |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
L |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * Search CPAN |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
L |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Copyright 2006 Atsushi Kobayashi, all rights reserved. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
117
|
|
|
|
|
|
|
under the same terms as Perl itself. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=cut |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
1; # End of Class::DBI::Plugin::AccessionSearch |