Helps for locating free UIDs
Go to file
Zane C. B-H 777ff2ca63 note changes and ass git repo link 2023-12-04 01:25:02 -06:00
lib/Sys/User some more cleanups and ready for release 2023-12-04 01:19:00 -06:00
t remove a old test 2023-12-04 00:43:05 -06:00
.gitignore Initial commit 2023-12-04 00:33:22 -06:00
.perlcriticrc import it 2023-12-04 00:39:41 -06:00
.perltidyrc import it 2023-12-04 00:39:41 -06:00
Changes note changes and ass git repo link 2023-12-04 01:25:02 -06:00
MANIFEST import it 2023-12-04 00:39:41 -06:00
Makefile.PL note changes and ass git repo link 2023-12-04 01:25:02 -06:00
README.md some more cleanups and ready for release 2023-12-04 01:19:00 -06:00

README.md

Sys-User-UIDhelper

Helps for locating free UIDs using getpwuid.

use Sys::User::UIDhelper;

# invokes it with the default values
my $foo = Sys::User::UIDhelper->new();

# sets the min to 2000 and the max to 4000
my $foo = Sys::User::UIDhelper->new(min=>2000, max=>4000);

# finds the first free one
my $first = $foo->firstfree();
if(defined($first)){
    print $first."\n";
}else{
    print "not found\n";
}

# finds the last free one
my $last = $foo->lastfree();
if(defined($last)){
    print $last."\n";
}else{
    print "not found\n";
}