Nakamura/GroupRole.pm untested

filter: Statementstmt 0.0% 0 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 50 CC 1 SCAR 6.9
CC
1
Cov
0%
help
2.0
command_line
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl -w
2  
3 package Sakai::Nakamura::GroupRole;
4  
5 use 5.008008;
6 use strict;
7 use warnings;
8 use Carp;
9 use base qw(Apache::Sling::GroupMember);
10 use Sakai::Nakamura;
11 use Sakai::Nakamura::Authn;
12  
13 require Exporter;
14  
15 use base qw(Exporter);
16  
17 our @EXPORT_OK = ();
18  
19 our $VERSION = '0.13';
20  
21 #{{{ sub help
22 sub help {
23  
24 print <<"EOF";
25 Usage: perl $0 [-OPTIONS [-MORE_OPTIONS]] [--] [PROGRAM_ARG1 ...]
26 The following options are accepted:
27  
28 --additions or -A (file) - file containing list of roles to be added to groups.
29 --add or -a (role) - add specified role.
30 --auth (type) - Specify auth type. If ommitted, default is used.
31 --delete or -d (role) - delete specified group role.
32 --exists or -e (role) - check whether specified role exists in group.
33 --group or -g (actOnGroup) - group to perform role actions on.
34 --help or -? - view the script synopsis and options.
35 --log or -L (log) - Log script output to specified log file.
36 --man or -M - view the full script documentation.
37 --pass or -p (password) - Password of user performing actions.
38 --threads or -t (threads) - Used with -A, defines number of parallel
39 processes to have running through file.
40 --url or -U (URL) - URL for system being tested against.
41 --user or -u (username) - Name of user to perform any actions as.
42 --verbose or -v or -vv or -vvv - Increase verbosity of output.
43 --view or -V - view roles of specified group.
44  
45 Options may be merged together. -- stops processing of options.
46 Space is not required between options and their arguments.
47 For full details run: perl $0 --man
48 EOF
49  
50 return 1;
51 }
52  
53 #}}}
54  
55 #{{{ sub command_line
56 sub command_line {
57 my ( $class, @ARGV ) = @_;
58 my $nakamura = Sakai::Nakamura->new;
59 my $config = $class->config( $nakamura, @ARGV );
60 my $authn = new Sakai::Nakamura::Authn( \$nakamura );
61 return $class->run( $nakamura, $config );
62 }
63  
64 #}}}
65  
66 1;
67  
68 __END__