/usr/share/perl5/Set/NestedGroups/Member.pm is in libset-nestedgroups-perl 0.01-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | package Set::NestedGroups::MemberList;
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
@ISA = qw();
# 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(
);
$VERSION = '0.01';
# Preloaded methods go here.
sub new {
my $proto=shift;
my $class=ref($proto) || $proto;
my $self ={};
$self->{'COUNT'}= 0;
bless($self,$class);
return $self;
}
sub add {
my $self=shift;
my ($member,$group)=@_;
push(@{$self->{'LIST'}},$member);
push(@{$self->{'LIST'}},$group);
$self->{'COUNT'}++;
}
sub next {
my $self=shift;
my $member=shift(@{$self->{'LIST'}});
my $group=shift(@{$self->{'LIST'}});
return ($member,$group);
}
sub rows {
my $self=shift;
return $self->{'COUNT'};
}
=head1 NAME
Set::NestedGroup::Member - Set of nested groups
=head1 SYNOPSIS
use Set::NestedGroup;
$acl = new Set::NestedGroup;
$acl->add('user','group');
$acl->add('group','parentgroup');
$list=$acl->list();
for(my $i=0;$i<$list->rows();$i++){
my ($member,$group)=$list->next();
print "$member=$group\n";
}
=head1 DESCRIPTION
Set::NestedGroup::Member objects are returns from a Set::NestedGroup
object's list() method.
=head1 METHODS
=item rows ()
Returns the number of rows this has. May be used to construct a loop
to extract all the data.
=item next ()
Returns a list comprising of the next member & group. Returns undef
when the list is exhausted.
=head1 AUTHOR
Alan R. Barclay, gorilla@elaine.drink.com
=head1 SEE ALSO
perl(1), Set::NestedGroup
=cut
|