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
|
|
1041
|
use strict; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
210
|
|
8
|
6
|
|
|
6
|
|
43
|
use warnings; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
192
|
|
9
|
6
|
|
|
6
|
|
43
|
use Carp; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
505
|
|
10
|
6
|
|
|
6
|
|
1297
|
use English qw(-no_match_vars); |
|
6
|
|
|
|
|
4926
|
|
|
6
|
|
|
|
|
55
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = q[477.1.4]; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
35
|
|
|
35
|
1
|
28449
|
my ($class, $ref) = @_; |
16
|
|
|
|
|
|
|
|
17
|
35
|
100
|
|
|
|
151
|
if(!$ref) { |
18
|
28
|
|
|
|
|
78
|
$ref = {}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
35
|
|
|
|
|
93
|
bless $ref, $class; |
22
|
|
|
|
|
|
|
|
23
|
35
|
|
|
|
|
116
|
return $ref; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dyn_use { |
27
|
3
|
|
|
3
|
1
|
9
|
my( $self, $classname ) = @_; |
28
|
3
|
50
|
|
|
|
49
|
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
|
|
|
|
326
|
eval "require $classname" or do { croak $EVAL_ERROR }; ## no critic qw(ProhibitStringyEval) |
|
0
|
|
|
|
|
0
|
|
39
|
3
|
|
|
|
|
94
|
$classname->import(); |
40
|
|
|
|
|
|
|
|
41
|
3
|
|
|
|
|
16
|
return 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |