BCSSH/Inline.pm

filter: Statementstmt 58.9% 23 / 39 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 1 totaltotal 50.8% 30 / 59 CC 3 SCAR 9.2
CC
3
Cov
51%
import
6.0
make_handler
4.2
BEGIN
1.0
CRAP 2.5
« BCSSH/Command/browse.pm ↑ Summary BCSSH/Handler.pm »
1 package App::BCSSH::Inline;
2 1 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Moo ();
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Moo::Role ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Module::Runtime qw(module_notional_filename);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Import::Into;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 our @EXPORT = qw(make_handler);
10  
11 0 ▶sub import {
Subroutine import: not called CC=2 SCAR=17.9
12 0 my $class = $_[0];
13 0 my ($target, $file) = caller;
14 0 my $filename = module_notional_filename($target);
15 0 ▶ $INC{$filename} ||= $file;
Condition0%0/3
$INC{$filename} ||= $file
l!l&&r!l&&!r
000
MC/DC0%0/2
$INC{$filename} ||= $file
$INC{$filename} $file
Truth table0%0/3
A ||= B
A= $INC{$filename}B= $file
ABresult
1X1
011
000
16  
17 0 $class->export_to_level(1, @_);
18 }
19  
20 0 ▶sub make_handler (&) {
Subroutine make_handler: not called CC=2 SCAR=14.4
Pod undocumented
21 0 my $handler = shift;
22 0 my ($class, $file) = caller;
23 0 my $handler_name = $class->handler;
24 0 my $role = 'App::BCSSH::Handler';
25 0 my $handler_class = "${role}::${handler_name}";
26 0 ▶ $INC{module_notional_filename($handler_class)} ||= $file;
Condition0%0/3
$INC{&module_notional_filename($handler_class)} ||= $file
l!l&&r!l&&!r
000
MC/DC0%0/2
$INC{&module_notional_filename($handler_class)} ||= $file
$INC{&module_notional_filename($handler_class)} $file
Truth table0%0/3
A ||= B
A= $INC{&module_notional_filename($handler_class)}B= $file
ABresult
1X1
011
000
27 0 Moo->import::into($handler_class);
28 0 Moo::Role->apply_roles_to_package($handler_class, $role);
29 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
30 0 *{"${handler_class}::handle"} = $handler;
31 0 return 1;
32 }
33  
34 1 1;
« BCSSH/Command/browse.pm ↑ Summary BCSSH/Handler.pm »