On Jul 4, 2012, at 5:46 PM, Chris Charley wrote: > > > "Phil Pinkerton" wrote in message > news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... >> 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
After switching input files It partially works but only for the first repository in the access file? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/