projects
/
apache2-authzcaps.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59f2225
)
Get rid of smartmatch
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Sep 2015 13:32:14 +0000
(16:32 +0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Sep 2015 13:32:14 +0000
(16:32 +0300)
lib/Apache2/AuthzCaps.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Apache2/AuthzCaps.pm
b/lib/Apache2/AuthzCaps.pm
index 281d3d6f6e3b63eaa9874172ea00f5030901bbc5..8ffaaac79cbc99f995be0d6e8ee596b9aa2877e7 100644
(file)
--- a/
lib/Apache2/AuthzCaps.pm
+++ b/
lib/Apache2/AuthzCaps.pm
@@
-4,7
+4,7
@@
use 5.014000;
use strict;
use warnings;
use subs qw/OK DECLINED/;
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';
our $VERSION = '0.001001';
use if $ENV{MOD_PERL}, 'Apache2::Access';
@@
-47,15
+47,10
@@
sub handler{
local $rootdir = $r->dir_config('AuthzCapsRootdir');
if ($user) {
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;
my ($command, @args) = split ' ', $requirement;
- given ($command){
- when('cap'){
- return OK if hascaps $user, @args
- }
-
- }
+ return OK if $command eq 'cap' && hascaps $user, @args;
}
}
}
}
This page took
0.010188 seconds
and
4
git commands to generate.