SVN::Access::Group - Object representing a SVN Access file group
use SVN::Access; my $acl = SVN::Access->new(acl_file => '/usr/local/svn/conf/badnews_svn_access.conf'); # add a member to all groups. foreach my $group ($acl->groups) { $group->add_member("peter"); }
Object wrapper around the groups portion of the SVN access control file. Groups usually look like...
[groups] everyone = harry, sally, joe, frank, sally, jane
the constructor, takes anything you want in hash form but im looking for members (arrayref), and the name of the group. the meat and potatoes if you will.
Example:
my $group = SVN::Access::Group->new( members => [qw/ray bob elle/], name => "Carpenters", ); $group->add_member("janette");
returns a list of the group's members.
my @members = $group->members;
removes a member from the group.
$group->remove_member("ray");
adds a member to the group. returns an error string for some reason. this is inconsistent with the rest of the interface, so expect either other methods to start having this, or expect this functionality to go away.
print $group->add_member("becky"); # should print "Member becky successfully added to Carpenters\n" print $group->add_member("janette"): # should print "Member janette already in group Carpenters\n"
returns true (the member's name) if the member exists.
if ($group->member_exists("ray")) { print "i thought i fired him...\n"; $group->remove_member("ray"); # carpenters don't need SVN access anyway }
light accessor method which returns the group's name.
subversion (http://subversion.tigris.org/), SVN::ACL, svnserve.conf
Michael Gregorowicz, <mike@mg2.org>
Copyright (C) 2012 by Michael Gregorowicz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install SVN::Access, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVN::Access
CPAN shell
perl -MCPAN -e shell install SVN::Access
For more information on module installation, please visit the detailed CPAN module installation guide.