line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2011 Peter Marschall . All rights reserved. |
2
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
3
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Net::LDAP::Control::Assertion; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1071
|
use Net::LDAP::Control; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
56
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Net::LDAP::Control); |
10
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
493
|
use Net::LDAP::Filter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
13
|
1
|
|
|
1
|
|
7
|
use Net::LDAP::ASN qw(Filter); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
14
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
219
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub init { |
17
|
0
|
|
|
0
|
1
|
|
my($self) = @_; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
delete $self->{asn}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
0
|
|
|
|
|
unless (exists $self->{value}) { |
22
|
0
|
|
0
|
|
|
|
$self->{asn} = $self->{assertion} || ''; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub assertion { |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
if (@_) { |
|
|
0
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
delete $self->{value}; |
33
|
0
|
|
|
|
|
|
return $self->{asn} = shift; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
elsif (exists $self->{value}) { |
36
|
0
|
|
|
|
|
|
my $f = $Filter->decode($self->{value}); |
37
|
0
|
0
|
0
|
|
|
|
$self->{asn} ||= Net::LDAP::Filter::as_string($f) |
38
|
|
|
|
|
|
|
if (ref $f); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
$self->{asn}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub value { |
45
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
unless (exists $self->{value}) { |
48
|
0
|
|
|
|
|
|
my $f = Net::LDAP::Filter->new; |
49
|
|
|
|
|
|
|
$self->{value} = $Filter->encode($f) |
50
|
0
|
0
|
|
|
|
|
if ($f->parse($self->{asn})); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
$self->{value}; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |