NAME

Net::LDAP::AutoDNs - Automatically make some default decisions some LDAP DNs and scopes.

VERSION

Version 0.0.1

SYNOPSIS

use Net::LDAP::AutoDNs;

my $obj = Net::LDAP::AutoDNs->new();

print $obj->{users}."\n";
print $obj->{usersScope}."\n";
print $obj->{dns}."\n";
print $obj->{dnsScope}."\n";
print $obj->{groups}."\n";
print $obj->{groupsScope}."\n";
print $obj->{home}."\n";
print $obj->{homeScope}."\n";

FUNCTIONS

new

Creates a new Net::LDAP::AutoDNs object.

#Only the hostname methode will be tried.
my $obj=Net::LDAP::AutoDNs->({methodes=>"hostname"});

#First the env methdoe will be tried and then the hostname methode.
my $obj=Net::LDAP::AutoDNs->({methodes=>"env,hostname"})

byEnv

This sets it up using $ENV{AutoDNbase} for the base.

byHostname

Sets the DNs based on the hostname. The last subdomain is chopped off and each '.' is replaced with a ',dc='. This means 'host.foo.bar' becomes 'dc=foo,dc=bar'.

Returns true if it succeeds.

sysctlMethode

This sets it based on sysctls.

The kernel module for this has currently not been created so this is not implemented as of currently.

Error Codes

$obj->{error} is defined, there is an error.

0

Methode not implemented.

1

Retrieving hostname failed. Most likely caused by 'hostname' not being in the path.

2

None of the methodes returned matched or returned true.

AUTHOR

Zane C. Bowers, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-net-ldap-autodns at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-LDAP-AutoDNs. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::LDAP::AutoDNs

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.