Helps for locating free GIDs
Go to file
Zane C. B-H 9ce6fc57e2 note the time of release 2023-12-04 01:59:07 -06:00
lib/Sys/Group rework it and do lots of cleanup 2023-12-04 01:52:01 -06:00
t some initial cleanup post import 2023-12-04 01:42:35 -06:00
.gitignore Initial commit 2023-12-04 01:32:43 -06:00
.perlcriticrc some initial cleanup post import 2023-12-04 01:42:35 -06:00
.perltidyrc some initial cleanup post import 2023-12-04 01:42:35 -06:00
Changes note the time of release 2023-12-04 01:59:07 -06:00
MANIFEST some initial cleanup post import 2023-12-04 01:42:35 -06:00
Makefile.PL add repo to makefile.pl 2023-12-04 01:43:40 -06:00
README.md fix a few docs in README.md 2023-12-04 01:57:41 -06:00

README.md

Sys-Group-GIDhelper

Helps for locating free GIDs using getgrgid.

use Sys::Group::GIDhelper;

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

# sets the min to 2000 and the max to 4000
$foo = Sys::Group::GIDhelper->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";
}