use strict;
use warnings;
use subs qw/OK DECLINED/;
-no if $] >= 5.017011, warnings => 'experimental::smartmatch';
+
our $VERSION = '0.001001';
use if $ENV{MOD_PERL}, 'Apache2::Access';
local $rootdir = $r->dir_config('AuthzCapsRootdir');
if ($user) {
- LOOP: for my $requirement (map { $_->{requirement} } @{$r->requires}) {
+ for my $requirement (map { $_->{requirement} } @{$r->requires}) {
my ($command, @args) = split ' ', $requirement;
- given ($command){
- when('cap'){
- return OK if hascaps $user, @args
- }
-
- }
+ return OK if $command eq 'cap' && hascaps $user, @args;
}
}