File Coverage

lib/WebService/Braintree/AdvancedSearch.pm
Criterion Covered Total %
statement 5 12 41.6
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 7 18 38.8


line stmt bran cond sub pod time code
1             package WebService::Braintree::AdvancedSearch;
2             $WebService::Braintree::AdvancedSearch::VERSION = '0.94';
3 20     20   347 use 5.010_001;
  20         62  
4 20     20   95 use strictures 1;
  20         106  
  20         668  
5              
6             sub search_to_hash {
7 0     0 0   my ($self, $search) = @_;
8              
9 0           my $hash = {};
10 0           for my $attribute ($search->meta()->get_all_attributes) {
11 0           my $field = $attribute->name;
12 0 0         if ($search->$field->active()) {
13 0           $hash->{$field} = $search->$field->criteria;
14             }
15             }
16              
17 0           return $hash;
18             }
19              
20             1;
21             __END__