File Coverage

blib/lib/DBIx/DataModel/Schema/ResultAs/Table.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             #----------------------------------------------------------------------
2             package DBIx::DataModel::Schema::ResultAs::Table;
3             #----------------------------------------------------------------------
4 1     1   482 use warnings;
  1         4  
  1         27  
5 1     1   5 use strict;
  1         2  
  1         18  
6              
7 1     1   4 use parent 'DBIx::DataModel::Schema::ResultAs';
  1         2  
  1         3  
8              
9             sub get_result {
10 1     1 1 2 my ($self, $statement) = @_;
11              
12 1         4 $statement->execute;
13 1         13 $statement->make_fast;
14 1         3 my @headers = $statement->headers;
15 1         28 my @vals = (\@headers);
16              
17 1         4 while (my $row = $statement->next) {
18 3         10 push @vals, [@{$row}{@headers}];
  3         11  
19             }
20 1         9 $statement->finish;
21              
22 1         36 return \@vals;
23             }
24              
25             1;
26              
27             __END__