The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PTools::SDF::File::AutoHome - Load NIS+ auto.home data into indexable object.

VERSION

This document describes version 0.03, released Nov 12, 2002.

DEPENDENCIES

This module depends on the following classes.

PTools::SDF::IDX, PTools::SDF::ARRAY, PTools::SDF::SDF and PTools::SDF::File.

DESCRIPTION

Constructor

new ( [ MapFile ] [, DataList ] )

Load data from a NIS auto.home file into an object of this class.

If MapFile is passed it may, currently, only be 'auto.home'.

If DataList is passed it is assumed to be an array of entries in auto.home file format, one line per entry. Otherwise this module runs a "ypcat -k auto.home".

use PTools::SDF::File::AutoHome;

$autohomeObj = new PTools::SDF::File::AutoHome;

Methods

All of the methods available in classes listed in the INHERITANCE section, below, are available in this module. These provide for sorting, indexing and accessing the data in objects of this class.

In addition the following two methods are defined for convenience when the number of users on a given machine is desired.

countUsersOnServer ( ServerName )

This method returns the number of users that have directories on a given ServerName.

$count = $autohomeObj->countUsersOnServer( "homesvr1" );
countUsersByServer

This method is invoked by the countUsersOnServer method upon first use. This tallys a user count for each server in the auto.home file.

save

Note that the save method in the PTools::SDF::SDF class is overridden here. This module provides read-only access to NIS AutoHome data.

DEPENDENCIES

This module depends on the following classes.

PTools::SDF::IDX, PTools::SDF::ARRAY, PTools::SDF::SDF and PTools::SDF::File.

INHERITANCE

This class inherits from both PTools::SDF::IDX and PTools::SDF::ARRAY. The PTools::SDF::ARRAY class inherits from PTools::SDF::SDF which, in turn, inherits from PTools::SDF::File.

SEE ALSO

For additional methods see PTools::SDF::IDX, PTools::SDF::ARRAY, PTools::SDF::SDF and PTools::SDF::File.

AUTHOR

Chris Cobb, <nospamplease@ccobb.net>

COPYRIGHT

Copyright (c) 2002-2007 by Chris Cobb. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.