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
|
|
475
|
use strict; |
|
6
|
|
|
|
|
25
|
|
|
6
|
|
|
|
|
153
|
|
8
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
149
|
|
9
|
6
|
|
|
6
|
|
31
|
use Carp; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
317
|
|
10
|
6
|
|
|
6
|
|
787
|
use English qw(-no_match_vars); |
|
6
|
|
|
|
|
3284
|
|
|
6
|
|
|
|
|
34
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = q[476.4.2]; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
35
|
|
|
35
|
1
|
17318
|
my ($class, $ref) = @_; |
16
|
|
|
|
|
|
|
|
17
|
35
|
100
|
|
|
|
101
|
if(!$ref) { |
18
|
28
|
|
|
|
|
49
|
$ref = {}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
35
|
|
|
|
|
64
|
bless $ref, $class; |
22
|
|
|
|
|
|
|
|
23
|
35
|
|
|
|
|
81
|
return $ref; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dyn_use { |
27
|
3
|
|
|
3
|
1
|
5
|
my( $self, $classname ) = @_; |
28
|
3
|
50
|
|
|
|
33
|
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
|
|
|
|
165
|
eval "require $classname" or do { croak $EVAL_ERROR }; ## no critic qw(ProhibitStringyEval) |
|
0
|
|
|
|
|
0
|
|
39
|
3
|
|
|
|
|
63
|
$classname->import(); |
40
|
|
|
|
|
|
|
|
41
|
3
|
|
|
|
|
7
|
return 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |