Branch Coverage

blib/lib/Mojolicious/Plugin/SetUserGroup.pm
Criterion Covered Total %
branch 8 30 26.6


line true false branch
17 1 2 unless defined $user
21 1 1 unless (defined getpwnam $user)
22 0 1 if $!
26 1 0 unless (defined getgrnam $group)
27 0 1 if $!
38 0 2 if 'Mojo::IOLoop'->is_running
48 0 0 unless (defined($uid = getpwnam $user))
49 0 0 if $!
53 0 0 unless (defined($gid = getgrnam $group))
54 0 0 if $!
63 0 0 if ($id != $gid and &any(sub { $_ eq $user; } , split(' ', $members, 0)))
69 0 0 if $!
71 0 0 unless (setgid($gid) == 0)
72 0 0 unless (setgroups(@gids))
73 0 0 unless (setuid($uid) == 0)