Exobrain/Agent/Run.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 53.8% 14 / 26 CC 2 SCAR 8.6
CC
2
Cov
50%
start
5.0
__ANON__
2.0
BEGIN
1.5
CRAP 2.4
« Exobrain/Agent/Action/SimpleBeeHabit.pm ↑ Summary Exobrain/Agent/Action/BeeInbox.pm »
1 package Exobrain::Agent::Run;
2 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: Role for agents which run 'continously'
7 our $VERSION = '1.08'; # VERSION
8  
9 with 'Exobrain::Agent';
10  
11 requires('run');
12 excludes('poll');
13  
14  
15 0 ▶method start() {
Subroutine BEGIN: called CC=1 SCAR=4.1
Subroutine start: not called CC=2 SCAR=16.1
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 0 0
16 0 $self->run;
17  
18 0 my $class = ref($self);
19 0 my $message = "Error: $class exited run() method unexpectedly.";
20  
21 0 ▶ try { $self->exobrain->notify($message, priority => 1); };
Subroutine __ANON__: not called CC=1 SCAR=6.9
22  
23 0 die $message;
24  
25 }
26  
27 1;
28  
29 __END__
« Exobrain/Agent/Action/SimpleBeeHabit.pm ↑ Summary Exobrain/Agent/Action/BeeInbox.pm »