Toto/Model.pm

filter: Statementstmt 50.0% 8 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 1 totaltotal 38.4% 10 / 26 CC 3 SCAR 19.0
CC
3
Cov
40%
autocomplete
12.0
__ANON__
2.0
BEGIN
1.0
CRAP 6.7
« Toto.pm ↑ Summary
1 package Mojolicious::Plugin::Toto::Model;
2 4 ▶use Mojo::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 has 'key';
4  
5 4 ▶use overload '""' => sub {
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine __ANON__: not called CC=1 SCAR=6.9
6 0 shift->key;
7 4 };
8  
9 0 ▶sub autocomplete {
Subroutine autocomplete: not called CC=3 SCAR=24.8
Pod undocumented
10 0 my $class = shift;
11 0 my %args = @_;
12 0 ▶ my $q = $args{q} or return;
Branch: 1 branch
BranchTrueFalseTotal
my $q = $args{"q"} or return 0 0 0
13 0 my $object = $args{object};
14 0 my $c = $args{c};
15 0 ▶ my $tab = $args{tab} || 'default';
Condition0%0/2
$args{'tab'} || 'default'
l!l
00
MC/DC0%0/1
$args{'tab'} || 'default'
$args{'tab'}
Truth table0%0/2
A
A= $args{'tab'}
Aresult
11
00
16 return [
17 0 map +{
18 name => "$object $_",
19 href => $c->url_for("$object/$tab", key => $_),
20 }, 1..10
21 ];
22 }
23  
24 4 1;
25  
« Toto.pm ↑ Summary