line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
6
|
|
|
6
|
|
847
|
use strict; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
176
|
|
8
|
6
|
|
|
6
|
|
37
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
213
|
|
9
|
6
|
|
|
6
|
|
35
|
use Carp; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
443
|
|
10
|
6
|
|
|
6
|
|
1109
|
use English qw(-no_match_vars); |
|
6
|
|
|
|
|
4287
|
|
|
6
|
|
|
|
|
47
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = q[477.1.2]; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
35
|
|
|
35
|
1
|
29150
|
my ($class, $ref) = @_; |
16
|
|
|
|
|
|
|
|
17
|
35
|
100
|
|
|
|
150
|
if(!$ref) { |
18
|
28
|
|
|
|
|
77
|
$ref = {}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
35
|
|
|
|
|
108
|
bless $ref, $class; |
22
|
|
|
|
|
|
|
|
23
|
35
|
|
|
|
|
119
|
return $ref; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dyn_use { |
27
|
3
|
|
|
3
|
1
|
7
|
my( $self, $classname ) = @_; |
28
|
3
|
50
|
|
|
|
44
|
my( $parent_namespace, $module ) = $classname =~ /^(.*?)([^:]+)$/smx ? ($1, $2) : (q[::], $classname); |
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
|
3
|
50
|
|
|
|
205
|
eval "require $classname" or do { croak $EVAL_ERROR }; ## no critic qw(ProhibitStringyEval) |
|
0
|
|
|
|
|
0
|
|
39
|
3
|
|
|
|
|
93
|
$classname->import(); |
40
|
|
|
|
|
|
|
|
41
|
3
|
|
|
|
|
12
|
return 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |