line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Prime::Util::MemFree; |
2
|
72
|
|
|
72
|
|
508
|
use strict; |
|
72
|
|
|
|
|
162
|
|
|
72
|
|
|
|
|
2074
|
|
3
|
72
|
|
|
72
|
|
374
|
use warnings; |
|
72
|
|
|
|
|
850
|
|
|
72
|
|
|
|
|
3276
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
72
|
|
|
72
|
|
228
|
$Math::Prime::Util::MemFree::AUTHORITY = 'cpan:DANAJ'; |
7
|
72
|
|
|
|
|
1517
|
$Math::Prime::Util::MemFree::VERSION = '0.73'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
72
|
|
|
72
|
|
419
|
use base qw( Exporter ); |
|
72
|
|
|
|
|
129
|
|
|
72
|
|
|
|
|
10958
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( ); |
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
72
|
|
|
72
|
|
537
|
use Math::Prime::Util; |
|
72
|
|
|
|
|
138
|
|
|
72
|
|
|
|
|
510
|
|
16
|
72
|
|
|
72
|
|
503
|
use Carp qw/carp croak confess/; |
|
72
|
|
|
|
|
171
|
|
|
72
|
|
|
|
|
11017
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $memfree_instances = 0; |
19
|
|
|
|
|
|
|
sub new { |
20
|
8
|
|
|
8
|
1
|
22
|
my $self = bless {}, shift; |
21
|
8
|
|
|
|
|
16
|
$memfree_instances++; |
22
|
8
|
|
|
|
|
39
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
sub DESTROY { |
25
|
8
|
|
|
8
|
|
29321
|
my $self = shift; |
26
|
8
|
50
|
|
|
|
30
|
confess "instances count mismatch" unless $memfree_instances > 0; |
27
|
8
|
100
|
|
|
|
995
|
Math::Prime::Util::prime_memfree if --$memfree_instances == 0; |
28
|
8
|
|
|
|
|
677
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |