line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sendmail::Queue::Base; |
2
|
1
|
|
|
1
|
|
6
|
use Carp qw(croak); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
163
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub make_accessors |
5
|
|
|
|
|
|
|
{ |
6
|
1
|
|
|
1
|
1
|
4
|
my ($class, @instance_vars) = @_; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
8
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
218
|
|
9
|
1
|
|
|
|
|
3
|
foreach my $name ( @instance_vars ) { |
10
|
|
|
|
|
|
|
# Create setter |
11
|
4
|
50
|
|
|
|
5
|
if( ! defined &{"${class}::set_$name"} ) { |
|
4
|
|
|
|
|
30
|
|
12
|
4
|
|
|
|
|
20
|
*{"${class}::set_$name"} = sub { |
13
|
9
|
|
|
9
|
|
2046
|
$_[0]->{$name} = $_[1]; |
14
|
4
|
|
|
|
|
25
|
}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Create getter |
18
|
4
|
50
|
|
|
|
5
|
if( ! defined &{"${class}::get_$name"} ) { |
|
4
|
|
|
|
|
25
|
|
19
|
4
|
|
|
|
|
24
|
*{"${class}::get_$name"} = sub { |
20
|
68
|
50
|
|
68
|
|
151
|
if( @_ > 1 ) { |
21
|
0
|
|
|
|
|
0
|
croak "Cannot call get_$name with an argument"; |
22
|
|
|
|
|
|
|
} |
23
|
68
|
|
|
|
|
792
|
return $_[0]->{$name}; |
24
|
4
|
|
|
|
|
16
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
1
|
|
|
1
|
|
6
|
use strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |