line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
|
|
|
|
|
|
$RPC::Serialized::ACL::Subject::VERSION = '1.123630'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
721
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
122
|
|
13
|
3
|
|
|
3
|
|
30
|
use warnings FATAL => 'all'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
130
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
455
|
use RPC::Serialized::Exceptions; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
20
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
10
|
|
|
10
|
0
|
3498
|
my $class = shift; |
19
|
10
|
|
|
|
|
16
|
my $name = shift; |
20
|
|
|
|
|
|
|
|
21
|
10
|
100
|
|
|
|
31
|
throw_app 'Subject name not specified' |
22
|
|
|
|
|
|
|
unless defined $name; |
23
|
|
|
|
|
|
|
|
24
|
9
|
|
|
|
|
42
|
return bless { |
25
|
|
|
|
|
|
|
NAME => $name, |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub name { |
30
|
89
|
|
|
89
|
0
|
1063
|
my $self = shift; |
31
|
89
|
|
|
|
|
605
|
return $self->{NAME}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub match { |
35
|
48
|
|
|
48
|
0
|
62
|
my $self = shift; |
36
|
48
|
|
|
|
|
66
|
my $subject = shift; |
37
|
|
|
|
|
|
|
|
38
|
48
|
100
|
|
|
|
81
|
return 1 if $self->name eq 'ALL'; |
39
|
38
|
|
100
|
|
|
123
|
return (defined $subject and $subject eq $self->name); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|