Branch Coverage

blib/lib/Mojolicious/Plugin/SetUserGroup.pm
Criterion Covered Total %
branch 12 30 40.0


line true false branch
16 1 3 unless defined $user
20 1 2 unless (defined getpwnam $user)
21 0 1 if $!
25 1 1 unless (defined getgrnam $group)
26 0 1 if $!
37 0 2 if 'Mojo::IOLoop'->is_running
47 0 1 unless (defined($uid = getpwnam $user))
48 0 0 if $!
52 0 1 unless (defined($gid = getgrnam $group))
53 0 0 if $!
58 1 0 if getuid() == $uid and getgid() == $gid
61 0 0 unless (defined $rc and $rc == 0)
63 0 0 unless (eval { do { initgroups($user, $gid); 1 } })
64 0 0 if (defined $error)
66 0 0 unless (defined $rc and $rc == 0)