BLAH/Enforces/Authentication.pm

filter: Statementstmt 78.5% 11 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 68.4% 13 / 19 CC 2 SCAR 12.5
CC
2
Cov
69%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
↑ Summary BLAH/Enforces/Authorization.pm »
1 #
2 # This file is part of BLAH
3 #
4 # This software is Copyright (c) 2015 by Chris Weyl.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 package BLAH::Enforces::Authentication;
11 2 our $AUTHORITY = 'cpan:RSRCHBOY';
12 2 $BLAH::Enforces::Authentication::VERSION = '0.001'; # TRIAL
13 # ABSTRACT: BLAH role for enforced authentication
14  
15 2 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use namespace::autoclean 0.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 2 with 'BLAH::Role::Authentication';
19  
20  
21 0 ▶before execute => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
22 0 my $self = shift @_;
23  
24 0 ▶ confess 'Attempt to execute without authentication!'
Branch: 1 branch
BranchTrueFalseTotal
unless $self->authenticated 0 0 0
25 unless $self->authenticated;
26  
27 0 return;
28 2 };
29  
30 2 !!42;
31  
32 __END__
↑ Summary BLAH/Enforces/Authorization.pm »