line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Prime::Util::MemFree; |
2
|
48
|
|
|
48
|
|
329
|
use strict; |
|
48
|
|
|
|
|
106
|
|
|
48
|
|
|
|
|
1392
|
|
3
|
48
|
|
|
48
|
|
243
|
use warnings; |
|
48
|
|
|
|
|
575
|
|
|
48
|
|
|
|
|
2145
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
48
|
|
|
48
|
|
154
|
$Math::Prime::Util::MemFree::AUTHORITY = 'cpan:DANAJ'; |
7
|
48
|
|
|
|
|
937
|
$Math::Prime::Util::MemFree::VERSION = '0.68'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
48
|
|
|
48
|
|
274
|
use base qw( Exporter ); |
|
48
|
|
|
|
|
104
|
|
|
48
|
|
|
|
|
7012
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( ); |
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
48
|
|
|
48
|
|
354
|
use Math::Prime::Util; |
|
48
|
|
|
|
|
91
|
|
|
48
|
|
|
|
|
290
|
|
16
|
48
|
|
|
48
|
|
277
|
use Carp qw/carp croak confess/; |
|
48
|
|
|
|
|
91
|
|
|
48
|
|
|
|
|
6661
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $memfree_instances = 0; |
19
|
|
|
|
|
|
|
sub new { |
20
|
8
|
|
|
8
|
1
|
24
|
my $self = bless {}, shift; |
21
|
8
|
|
|
|
|
15
|
$memfree_instances++; |
22
|
8
|
|
|
|
|
39
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
sub DESTROY { |
25
|
8
|
|
|
8
|
|
29057
|
my $self = shift; |
26
|
8
|
50
|
|
|
|
30
|
confess "instances count mismatch" unless $memfree_instances > 0; |
27
|
8
|
100
|
|
|
|
493
|
Math::Prime::Util::prime_memfree if --$memfree_instances == 0; |
28
|
8
|
|
|
|
|
571
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |