package Hesiod;

use strict;
use Carp;
use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader);
use vars qw( @EXPORT @EXPORT_OK $VERSION );
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
	hes_to_bind
	hes_resolve
	hes_getmailhost
	hes_getpwnam
	hes_getpwuid
);
@EXPORT_OK = qw(
	getmailhost
	getpwnam
	getpwuid
);
$VERSION = '0.80';

sub AUTOLOAD {
    $AutoLoader::AUTOLOAD = $AUTOLOAD;
    goto &AutoLoader::AUTOLOAD;
}

bootstrap Hesiod $VERSION;

# Preloaded methods go here.

# Autoload methods go after =cut, and are processed by the autosplit program.

1;
__END__
# Below is the stub of documentation for your module. You better edit it!

=head1 NAME

Hesiod - Perl interface to the Hesiod library

=head1 SYNOPSIS

  use Hesiod;
  @records      = hes_resolve($hesiod_name, $type);

  $bind_address = hes_to_bind($hesiod_name, $type);

  ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell)
	= hes_getpwnam('username');
  ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell)
	= hes_getpwuid($uid);
  ($type, $host, $name) = hes_getmailhost('username');

  use Hesiod qw( getpwnam getpwuid );
  ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell)
	= getpwnam('username');
  ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell)
	= getpwuid($uid);

=head1 DESCRIPTION

  These functions provide an interface to the C Hesiod library.

  The command
	use Hesiod qw( getpwnam getpwuid );
  replaces built-in Perl getpw* with the hes_getpw* functions.

=head1 AUTHOR

Albert Dvornik, bert@mit.edu

=head1 SEE ALSO

hesiod(3), perl(1).

=cut
