line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Braintree::AdvancedSearch; |
2
|
|
|
|
|
|
|
$WebService::Braintree::AdvancedSearch::VERSION = '0.93'; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
10
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
48
|
|
5
|
1
|
|
|
1
|
|
10
|
use vars qw(@ISA @EXPORT_OK); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
78
|
|
6
|
1
|
|
|
1
|
|
10
|
use Exporter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
220
|
|
7
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw(search_to_hash); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub search_to_hash { |
11
|
0
|
|
|
0
|
0
|
|
my ($self,$search) = @_; |
12
|
0
|
|
|
|
|
|
my $hash = {}; |
13
|
0
|
|
|
|
|
|
for my $attribute ($search->meta()->get_all_attributes) { |
14
|
0
|
|
|
|
|
|
my $field = $attribute->name; |
15
|
0
|
0
|
|
|
|
|
if ($search->$field->active()) { |
16
|
0
|
|
|
|
|
|
$hash->{$field} = $search->$field->criteria; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
0
|
|
|
|
|
|
return $hash; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |