Cmd/WithDSN/Read.pm

filter: Statementstmt 63.1% 12 / 19 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 57.6% 15 / 26 CC 2 SCAR 11.0
CC
2
Cov
57%
_build_backend
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Cmd/WithDSN/Write.pm ↑ Summary Cmd/InputHandle.pm »
1 #!/usr/bin/perl
2  
3 package KiokuDB::Cmd::WithDSN::Read;
4 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 with qw(
11 KiokuDB::Cmd::WithDSN
12 );
13  
14 1 requires "v";
15  
16 0 ▶sub _build_backend {
Subroutine _build_backend: not called CC=2 SCAR=17.9
17 0 my $self = shift;
18  
19 0 ▶ my $dsn = $self->dsn || croak("--dsn is required");
Condition0%0/2
$self->dsn || croak('--dsn is required')
l!l
00
MC/DC0%0/1
$self->dsn || croak('--dsn is required')
$self->dsn
Truth table0%0/2
A
A= $self->dsn
Aresult
11
00
20  
21 0 $self->v("Connecting to DSN $dsn...");
22  
23 0 require KiokuDB::Util;
24 0 my $b = KiokuDB::Util::dsn_to_backend( $dsn, readonly => 1 );
25  
26 0 $self->v(" $b\n");
27  
28 0 $b;
29 }
30  
31 1 __PACKAGE__
32  
33 __END__
« Cmd/WithDSN/Write.pm ↑ Summary Cmd/InputHandle.pm »