![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The Table object represents an individual NIS map. A NIS map is bound to a Table object with the new method:
$obj = Net::NIS::Table->new($map, [ $domain ]);
For example,
$hostsmap = Net::NIS::Table->new("hosts.byname");
This will create a Table object bound to the hosts.byname
NIS map in the default NIS domain. All operations on the
$hostsmap
object will relate to the hosts.byname
map.
You can also specify a non-default domain:
$hostsmap = Net::NIS::Table->new("hosts.byname", "my.domain.com.au");
Once a Table object has been bound to a NIS map, the following methods are available:
%data
array correspond to the keys in the
NIS map. If any error occurs that prevents the retrieval of the map, then
the undefined value is returned. In this case, your program can use the
status method to determine the cause of the error.
$Net::NIS::ERR_ACCESS Access violation $Net::NIS::ERR_BADARGS Args to function are bad $Net::NIS::ERR_BADDB yp data base is bad $Net::NIS::ERR_BUSY Database is busy $Net::NIS::ERR_DOMAIN Can't bind to a server which serves this domain $Net::NIS::ERR_KEY No such key in map $Net::NIS::ERR_MAP No such map in server's domain $Net::NIS::ERR_NODOM Local domain name not set $Net::NIS::ERR_PMAP Can't communicate with portmapper $Net::NIS::ERR_NOMORE No more records in map database $Net::NIS::ERR_RESRC Local resource allocation failure $Net::NIS::ERR_RPC RPC failure $Net::NIS::ERR_YPBIND Can't communicate with ypbind $Net::NIS::ERR_YPERR Internal yp server or client interface error $Net::NIS::ERR_YPSERV Can't communicate with ypserv $Net::NIS::ERR_VERS YP version mismatch
The Network Information Service (NIS) was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same; only the name has changed. The name Yellow Pages is a registered trademark in the United Kingdom of British Telecommunications plc, and may not be used without permission.
$CommentsMailTo = "perl5@dcs.ed.ac.uk"; include("../syssies_footer.inc");?>