"Phil Pinkerton" wrote in message
news:[email protected]...
Very nice to know about CPAN.
got a syntax error though with your script
syntax error at ./getACLinfo.pl line 51, near "say join"
Execution of ./getACLinfo.pl aborted due to compilation errors.
[code]
#!/usr/bin/perl
use strict;
use SVN::Access;
my $acl = SVN::Access->new( acl_file => 'data' );
# Walk through the resources in the ACL file:
for my $repopath ($acl->resources) {
# For this resource, find out what authorisations exist:
for my $auth ($repopath->authorized) {
# $repopath->authorized gives us hashrefs of group => perms
# TODO: I don't know if it might also give individual users, if
# had per-user grants.
my ($group, $perms) = each %$auth;
if ($group =~ s/^@//) {
# For each group, list out the members, along with the repo
# permissions
for my $user ($acl->group($group)->members) {
say join '~', $user, $repopath->name, $group, $perms;
}
} else {
die "Can't handle individual user permissions!";
}
}
}
[/code]
Hello Phil,
Your script needs to use 5.010 or better to use the 'say' function.
Right after the 'use strict;' line, enter 'use 5.010;' or
a newer version if that is what you have.
Or, replace say with 'print':
print join('~', $user, $repopath->name, $group, $perms), "\n";
Chris
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/