Serialized/ACL/Subject.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 92.5% 37 / 40 CC 4 SCAR 6.4
CC
4
Cov
100%
match
3.0
new
2.0
BEGIN
1.0
CRAP 1.9
« Serialized/ACL/Operation.pm ↑ Summary Serialized/ACL/Target.pm »
1 #
2 # $HeadURL: https://svn.oucs.ox.ac.uk/people/oliver/pub/librpc-serialized-perl/trunk/lib/RPC/Serialized/ACL/Subject.pm $
3 # $LastChangedRevision: 1281 $
4 # $LastChangedDate: 2008-10-01 16:16:56 +0100 (Wed, 01 Oct 2008) $
5 # $LastChangedBy: oliver $
6 #
7 package RPC::Serialized::ACL::Subject;
8 {
9 3 $RPC::Serialized::ACL::Subject::VERSION = '1.123630';
10 }
11  
12 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 3 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶use RPC::Serialized::Exceptions;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 10 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
18 10 my $class = shift;
19 10 my $name = shift;
20  
21 10 ▶ throw_app 'Subject name not specified'
Branch: 1 branch
BranchTrueFalseTotal
unless defined $name 1 9 10
22 unless defined $name;
23  
24 9 return bless {
25 NAME => $name,
26 }, $class;
27 }
28  
29 89 ▶sub name {
Subroutine name: called CC=1 SCAR=0.0
Pod undocumented
30 89 my $self = shift;
31 89 return $self->{NAME};
32 }
33  
34 48 ▶sub match {
Subroutine match: called CC=3 SCAR=11.0
Pod undocumented
35 48 my $self = shift;
36 48 my $subject = shift;
37  
38 48 ▶ return 1 if $self->name eq 'ALL';
Branch: 1 branch
BranchTrueFalseTotal
if $self->name eq "ALL" 10 38 48
39 38 ▶ return (defined $subject and $subject eq $self->name);
Condition100%3/3
defined $subject && $subject eq $self->name
!ll&&!rl&&r
11621
MC/DC100%2/2
defined $subject && $subject eq $self->name
defined $subject $subject eq $self->name
Truth table100%3/3
A && B
A= defined $subjectB= $subject eq $self->name
ABresult
0X0
100
111
40 }
41  
42 3 1;
43  
« Serialized/ACL/Operation.pm ↑ Summary Serialized/ACL/Target.pm »