Branch Coverage

blib/lib/SVN/Access.pm
Criterion Covered Total %
branch 68 98 69.3


line true false branch
19 0 6 unless $attr{'acl_file'}
21 5 1 if (-e $attr{'acl_file'}) { }
33 0 5 unless open ACL, '<', $$self{'acl_file'}
38 2 91 if $line =~ /^#/
42 23 68 unless $line
45 2 66 if ($line =~ /^\s+(.+)$/) { }
55 2 66 if ($nextline and $nextline =~ /^[ \t]+\S/)
59 0 66 unless $statement
61 24 42 if ($statement =~ /^\[\s*(.+?)\s*\]$/) { }
64 17 7 unless ($current_resource =~ /^(?:groups|aliases)$/)
71 6 36 if ($current_resource eq 'groups') { }
3 33 elsif ($current_resource eq 'aliases') { }
79 33 0 if (my $resource = $self->resource($current_resource)) { }
91 2 3 unless (ref $$self{'acl'}{'aliases'} eq 'HASH')
103 3 3 if ($self->groups)
110 19 1 if (defined $resource and $resource->authorized)
112 5 30 if ($k =~ /^@(.*)/)
113 2 3 unless ($groups{$1})
121 1 5 scalar @errors ? :
128 1 5 if (my $error = $self->verify_acl)
132 0 5 if (ref \$out eq 'GLOB' or ref $out) { }
136 5 0 unless $out
137 0 5 unless open ACL, '>', $out
141 2 3 if (scalar keys %{$self->aliases;})
150 3 2 if ($self->groups)
159 13 1 if (defined $resource and $resource->authorized)
175 0 0 if (my $error = $self->verify_acl)
183 0 0 if (scalar keys %{$self->aliases;})
189 0 0 if ($self->groups)
194 0 0 if ($self->resources)
202 0 0 length $_ >= $max_len ? :
205 0 0 unless open ACL, '>', $$self{'acl_file'}
208 0 0 if (scalar keys %{$self->aliases;})
217 0 0 if ($self->groups)
226 0 0 if (defined $resource and $resource->authorized)
249 1 1 if (exists $$self{'acl'}{'aliases'}{$alias_name})
258 1 9 unless (ref $$self{'acl'}{'aliases'} eq 'HASH')
266 1 24 if ($resource_name eq 'name')
270 0 25 if ($self->resource($resource_name)) { }
0 25 elsif (not $resource_name =~ m[^(?:\S+\:)?/.*$]) { }
288 25 8 unless $resource->name eq $resource_name
290 7 1 scalar @resources ? :
295 76 9 if (ref $$self{'acl'}{'resources'} eq 'ARRAY') { }
305 40 151 if defined $resource and $resource->name eq $resource_name
316 0 7 if ($self->group($group_name)) { }
335 0 1 unless $group->name eq $group_name
338 0 1 scalar @groups ? :
343 21 11 if (ref $$self{'acl'}{'groups'} eq 'ARRAY') { }
353 6 11 if defined $group and $group->name eq $group_name