line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Radius::Server::Base; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
27
|
use 5.008; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
1
|
|
|
1
|
|
6
|
use base qw/Net::Radius::Server Exporter/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
146
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# These are constants useful for the "match" methods |
11
|
1
|
|
|
1
|
|
6
|
use constant NRS_MATCH_FAIL => 0x0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
12
|
1
|
|
|
1
|
|
5
|
use constant NRS_MATCH_OK => 0x1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
41
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# These constants are used for the "set" methods |
15
|
1
|
|
|
1
|
|
4
|
use constant NRS_SET_CONTINUE => 0x0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
99
|
|
16
|
1
|
|
|
1
|
|
4
|
use constant NRS_SET_SKIP => 0x1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
17
|
1
|
|
|
1
|
|
5
|
use constant NRS_SET_RESPOND => 0x2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
18
|
1
|
|
|
1
|
|
6
|
use constant NRS_SET_DISCARD => 0x4; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
415
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
21
|
|
|
|
|
|
|
match => |
22
|
|
|
|
|
|
|
[ qw( |
23
|
|
|
|
|
|
|
NRS_MATCH_FAIL |
24
|
|
|
|
|
|
|
NRS_MATCH_OK |
25
|
|
|
|
|
|
|
)], |
26
|
|
|
|
|
|
|
set => |
27
|
|
|
|
|
|
|
[ qw( |
28
|
|
|
|
|
|
|
NRS_SET_CONTINUE |
29
|
|
|
|
|
|
|
NRS_SET_SKIP |
30
|
|
|
|
|
|
|
NRS_SET_RESPOND |
31
|
|
|
|
|
|
|
NRS_SET_DISCARD |
32
|
|
|
|
|
|
|
)], |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
do |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
my %seen = (); |
38
|
|
|
|
|
|
|
my @all = (); |
39
|
|
|
|
|
|
|
for my $k (keys %EXPORT_TAGS) |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
push @all, grep { ! $seen{$_}++ } @{$EXPORT_TAGS{$k}}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = \@all; |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Exporter::export_ok_tags('all'); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
our $VERSION = do { sprintf "%0.3f", 1+(q$Revision: 75 $ =~ /\d+/g)[0]/1000 }; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/description log_level/); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub log |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
55
|
0
|
|
|
|
|
|
my $level = shift; |
56
|
|
|
|
|
|
|
|
57
|
0
|
0
|
0
|
|
|
|
return unless $level <= ($self->log_level || 2); |
58
|
0
|
0
|
|
|
|
|
if ($self->can('description')) |
|
|
0
|
|
|
|
|
|
59
|
|
|
|
|
|
|
{ |
60
|
0
|
|
|
|
|
|
warn $self->description . ": " . join(" ", @_) . "\n"; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
elsif (ref($self)) |
63
|
|
|
|
|
|
|
{ |
64
|
0
|
|
|
|
|
|
warn ref($self) . ": " . join(" ", @_) . "\n"; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
else |
67
|
|
|
|
|
|
|
{ |
68
|
0
|
|
|
|
|
|
warn @_, "\n"; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub new |
73
|
|
|
|
|
|
|
{ |
74
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
75
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
76
|
0
|
|
|
|
|
|
my @c = caller; |
77
|
0
|
0
|
0
|
|
|
|
$self->description((ref($class) || $class) . " ($c[1]:$c[2])") |
78
|
|
|
|
|
|
|
unless $self->description; |
79
|
0
|
|
|
|
|
|
return $self; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
42; |
82
|
|
|
|
|
|
|
__END__ |