Async/Row.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 57.1% 12 / 21 CC 2 SCAR 11.6
CC
2
Cov
57%
field
6.0
new
2.0
BEGIN
1.0
CRAP 3.2
« Async/ORM/Type.pm ↑ Summary Async/Pool.pm »
1 package Database::Async::Row;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 our $VERSION = '0.019'; # VERSION
7  
8 =head1 NAME
9  
10 Database::Async::Row - represents a single row response
11  
12 =head1 DESCRIPTION
13  
14  
15 =cut
16  
17 =head1 METHODS
18  
19 =cut
20  
21 =head2 new
22  
23 =cut
24  
25 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
26 0 my $self = shift;
27 0 bless { @_ }, $self
28 }
29  
30 =head2 field
31  
32 =cut
33  
34 0 ▶sub field {
Subroutine field: not called CC=2 SCAR=17.9
Pod documented
35 0 my ($self, $name) = @_;
36 $self->{data}[$self->{index_by_name}{$name} // die 'unknown field ' . $name]->{data}
37 0 ▶}
Condition0%0/2
$self->{"index_by_name"}{$name} // die('unknown field ' . $name)
l!l
00
MC/DC0%0/1
$self->{"index_by_name"}{$name} // die('unknown field ' . $name)
$self->{"index_by_name"}{$name}
Truth table0%0/2
A
A= $self->{"index_by_name"}{$name}
Aresult
11
00
38  
39 6 1;
40  
41 __END__
« Async/ORM/Type.pm ↑ Summary Async/Pool.pm »