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/Target.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::Target; |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$RPC::Serialized::ACL::Target::VERSION = '1.123630'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
645
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
101
|
|
13
|
3
|
|
|
3
|
|
13
|
use warnings FATAL => 'all'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
99
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
472
|
use RPC::Serialized::Exceptions; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
20
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
10
|
|
|
10
|
0
|
2399
|
my $class = shift; |
19
|
10
|
|
|
|
|
13
|
my $name = shift; |
20
|
|
|
|
|
|
|
|
21
|
10
|
100
|
|
|
|
28
|
throw_app 'Target name not specified' |
22
|
|
|
|
|
|
|
unless defined $name; |
23
|
|
|
|
|
|
|
|
24
|
9
|
|
|
|
|
43
|
return bless { |
25
|
|
|
|
|
|
|
NAME => $name, |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub name { |
30
|
64
|
|
|
64
|
0
|
593
|
my $self = shift; |
31
|
64
|
|
|
|
|
339
|
return $self->{NAME}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub match { |
35
|
36
|
|
|
36
|
0
|
47
|
my $self = shift; |
36
|
36
|
|
|
|
|
45
|
my $target = shift; |
37
|
|
|
|
|
|
|
|
38
|
36
|
100
|
|
|
|
70
|
return 1 if $self->name eq 'ALL'; |
39
|
25
|
|
100
|
|
|
85
|
return (defined $target and $target eq $self->name); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|