blib/lib/ClearPress/authenticator.pm

filter: Statementstmt 96.0% 24 / 25 Branchbran 66.6% 4 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 92.3% 36 / 39 CC 4 SCAR 6.8
CC
4
Cov
90%
dyn_use
3.2
new
2.0
BEGIN
1.0
CRAP 2.0
« blib/lib/ClearPress/authenticator/session.pm ↑ Summary blib/lib/ClearPress.pm »
1 # -*- mode: cperl; tab-width: 8; indent-tabs-mode: nil; basic-offset: 2 -*-
2 # vim:ts=8:sw=2:et:sta:sts=2
3 #########
4 # Author: rmp
5 #
6 package ClearPress::authenticator;
7 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 7 our $VERSION = q[2026.07.25];
13  
14 35 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
15 35 my ($class, $ref) = @_;
16  
17 35 ▶ if(!$ref) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ref) 28 7 35
18 28 $ref = {};
19 }
20  
21 35 bless $ref, $class;
22  
23 35 return $ref;
24 }
25  
26 3 ▶sub dyn_use {
Subroutine dyn_use: called CC=3 SCAR=11.8
Pod documented
27 3 my( $self, $classname ) = @_;
28 3 ▶ my( $parent_namespace, $module ) = $classname =~ /^(.*?)([^:]+)$/smx ? ($1, $2) : (q[::], $classname);
Branch: 1 branch
BranchTrueFalseTotal
$classname =~ /^(.*?)([^:]+)$/msx ? : 3 0 3
29  
30 # {
31 # no strict 'refs'; ## no critic (ProhibitNoStrict)
32 # if($parent_namespace->{$module.q[::]}) {
33 #carp qq[$classname already loaded (${module}:: in $parent_namespace)];
34 # return 1;
35 # }
36 # }
37  
38 0 ▶ eval "require $classname" or do { croak $EVAL_ERROR }; ## no critic qw(ProhibitStringyEval)
Branch: 1 branch
BranchTrueFalseTotal
eval "require $classname" or do { croak($ClearPress::authenticator::EVAL_ERROR) } 3 0 3
39 3 $classname->import();
40  
41 3 return 1;
42 }
43  
44 7 1;
45 __END__
« blib/lib/ClearPress/authenticator/session.pm ↑ Summary blib/lib/ClearPress.pm »