line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
48213
|
use 5.006; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
78
|
|
2
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
71
|
|
3
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
129
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Math::Random::OO; |
6
|
|
|
|
|
|
|
# ABSTRACT: Consistent object-oriented interface for generating random numbers |
7
|
|
|
|
|
|
|
our $VERSION = '0.22'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
223
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
2
|
|
|
2
|
|
18
|
my ( $class, @symbols ) = @_; |
13
|
2
|
|
|
|
|
4
|
my $caller = caller; |
14
|
2
|
|
|
|
|
14
|
for (@symbols) { |
15
|
2
|
|
|
2
|
|
14
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
349
|
|
16
|
4
|
|
|
|
|
14
|
my $subclass = "Math::Random::OO::$_"; |
17
|
4
|
|
|
|
|
268
|
eval "require $subclass"; |
18
|
4
|
|
|
4
|
|
24
|
*{"${caller}::$_"} = sub { return ${subclass}->new(@_) }; |
|
4
|
|
|
|
|
39
|
|
|
4
|
|
|
|
|
2649
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
2
|
|
|
2
|
1
|
773
|
my $class = shift; |
24
|
2
|
100
|
|
|
|
14
|
return bless( {}, ref($class) ? ref($class) : $class ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
1
|
10
|
sub seed { die "call to abstract method 'seed'" } |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
1
|
316
|
sub next { die "call to abstract method 'next'" } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |