line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::LDAP::Entry::ToText; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
22775
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
6
|
use Exporter; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
61
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
319
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our @EXPORT = qw(NetLDAPEntryToText); |
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw(NetLDAPEntryToText); |
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = (DEFAULT => [qw(NetLDAPEntryToText)]); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Net::LDAP::Entry::ToText - Conterts a Net::LDAP::Entry object to text. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 VERSION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Version 0.0.0 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = '0.0.0'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use Net::LDAP::Entry::ToText; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $foo = NetLDAPEntryToText($entry); |
33
|
|
|
|
|
|
|
... |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 EXPORT |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
NetLDAPEntryToText |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 FUNCTIONS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 NetLDAPEntryToText |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub NetLDAPEntryToText { |
46
|
0
|
|
|
0
|
1
|
|
my $entry=$_[0]; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $dn=$entry->dn(); |
49
|
|
|
|
|
|
|
#return undef if it fails |
50
|
|
|
|
|
|
|
#if this fails it means |
51
|
0
|
0
|
|
|
|
|
if (!$dn) { |
52
|
0
|
|
|
|
|
|
return undef; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $text='dn: '.$dn."\n"; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
foreach my $attr ( $entry->attributes ) { |
58
|
0
|
|
|
|
|
|
my @values=$entry->get_value($attr); |
59
|
0
|
|
|
|
|
|
my $valuesInt=0; |
60
|
0
|
|
|
|
|
|
while (defined($values[$valuesInt])) { |
61
|
0
|
|
|
|
|
|
$text=$text.$attr.': '.$values[$valuesInt]."\n"; |
62
|
0
|
|
|
|
|
|
$valuesInt++; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
return $text; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Zane C. Bowers, C<< >> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
77
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
78
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 SUPPORT |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
perldoc Net::LDAP::Entry::ToText |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
You can also look for information at: |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over 4 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
L |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * CPAN Ratings |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * Search CPAN |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=back |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Copyright 2008 Zane C. Bowers, all rights reserved. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
121
|
|
|
|
|
|
|
under the same terms as Perl itself. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
1; # End of Net::LDAP::Entry::ToText |