| 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
| |||||||||||||
| 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'
MC/DC0%0/1
$args{'tab'} || 'default'
$args{'tab'}
Truth table0%0/2
A
A= $args{'tab'}
| |||||||||||||
| 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 | |||||||||||||