Reply/Plugin/LoadClass.pm

filter: Statementstmt 69.2% 18 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 1 / 1 totaltotal 64.8% 24 / 37 CC 2 SCAR 8.5
CC
2
Cov
64%
__ANON__
6.0
execute
2.0
__ANON__
2.0
CRAP 2.3
« Reply/Plugin/LexicalPersistence.pm ↑ Summary Reply/Plugin/Interrupt.pm »
1 package Reply::Plugin::LoadClass;
2 1 our $AUTHORITY = 'cpan:DOY';
3 1 $Reply::Plugin::LoadClass::VERSION = '0.42';
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 # ABSTRACT: attempts to load classes implicitly if possible
7  
8 1 ▶use base 'Reply::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Module::Runtime 'use_package_optimistically';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 0 ▶sub execute {
Subroutine execute: not called CC=1 SCAR=6.9
Pod documented
15 0 my $self = shift;
16 0 my ($next, @args) = @_;
17  
18 0 ▶ try {
Subroutine __ANON__: not called CC=1 SCAR=6.9
19 0 $next->(@args);
20 }
21 0 ▶ catch {
Subroutine __ANON__: not called CC=2 SCAR=17.9
22 0 ▶ if (/^Can't locate object method "[^"]*" via package "([^"]*)"/) {
Branch: 1 branch
BranchTrueFalseTotal
if (/^Can't locate object method "[^"]*" via package "([^"]*)"/) { } 0 0 0
23 0 use_package_optimistically($1);
24 0 $next->(@args);
25 }
26 else {
27 0 die $_;
28 }
29 }
30 0 }
31  
32 1 1;
33  
34 __END__
« Reply/Plugin/LexicalPersistence.pm ↑ Summary Reply/Plugin/Interrupt.pm »