| Net-LDAP-Entry-ToText documentation | Contained in the Net-LDAP-Entry-ToText distribution. |
Net::LDAP::Entry::ToText - Conterts a Net::LDAP::Entry object to text.
Version 0.0.0
use Net::LDAP::Entry::ToText;
my $foo = NetLDAPEntryToText($entry);
...
NetLDAPEntryToText
Zane C. Bowers, <vvelox at vvelox.net>
Please report any bugs or feature requests to bug-net-ldap-totext at rt.cpan.org, or through
the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-LDAP-Entry-ToText. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Net::LDAP::Entry::ToText
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-LDAP-Entry-ToText
Copyright 2008 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Net-LDAP-Entry-ToText documentation | Contained in the Net-LDAP-Entry-ToText distribution. |
package Net::LDAP::Entry::ToText; use warnings; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our @ISA = qw(Exporter); our @EXPORT = qw(NetLDAPEntryToText); our @EXPORT_OK = qw(NetLDAPEntryToText); our %EXPORT_TAGS = (DEFAULT => [qw(NetLDAPEntryToText)]);
our $VERSION = '0.0.0';
sub NetLDAPEntryToText { my $entry=$_[0]; my $dn=$entry->dn(); #return undef if it fails #if this fails it means if (!$dn) { return undef; } my $text='dn: '.$dn."\n"; foreach my $attr ( $entry->attributes ) { my @values=$entry->get_value($attr); my $valuesInt=0; while (defined($values[$valuesInt])) { $text=$text.$attr.': '.$values[$valuesInt]."\n"; $valuesInt++; } } return $text; }
1; # End of Net::LDAP::Entry::ToText