Make mod_perl optional, silence smartmatch warnings
[apache2-authzcaps.git] / lib / Apache2 / AuthzCaps.pm
index ac16d17d0cf2b4bbdb3b1c9e0f91ef497f83b129..b0ccffc4da58bab532475e4279cd862be9e7bcf3 100644 (file)
@@ -3,10 +3,12 @@ package Apache2::AuthzCaps 0.001;
 use 5.014000;
 use strict;
 use warnings;
+use subs qw/OK DECLINED/;
+no if $] >= 5.017011, warnings => 'experimental::smartmatch';
 
-use Apache2::Access;
-use Apache2::Const qw/OK DECLINED/;
-use Apache2::RequestRec;
+use if $ENV{MOD_PERL}, 'Apache2::Access';
+use if $ENV{MOD_PERL}, 'Apache2::Const' => qw/OK DECLINED/;
+use if $ENV{MOD_PERL}, 'Apache2::RequestRec';
 use YAML::Any qw/LoadFile DumpFile/;
 
 use parent qw/Exporter/;
This page took 0.009378 seconds and 4 git commands to generate.