Michael Gregorowicz > SVN-Access-0.08 > SVN::Access::Group

Download:
SVN-Access-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.08   Source   Latest Release: SVN-Access-0.09

NAME ^

SVN::Access::Group - Object representing a SVN Access file group

SYNOPSIS ^

 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");
 }

DESCRIPTION ^

Object wrapper around the groups portion of the SVN access control file. Groups usually look like...

[groups] everyone = harry, sally, joe, frank, sally, jane

METHODS ^

new

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");
members

returns a list of the group's members.

Example:

  my @members = $group->members;
remove_member

removes a member from the group.

Example:

  $group->remove_member("ray");
add_member

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.

Example:

  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"
member_exists

returns true (the member's name) if the member exists.

Example:

  if ($group->member_exists("ray")) {
      print "i thought i fired him...\n";
      $group->remove_member("ray"); # carpenters don't need SVN access anyway
  }
name

light accessor method which returns the group's name.

SEE ALSO ^

subversion (http://subversion.tigris.org/), SVN::ACL, svnserve.conf

AUTHOR ^

Michael Gregorowicz, <mike@mg2.org>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: