line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Prime::Util::MemFree; |
2
|
69
|
|
|
69
|
|
464
|
use strict; |
|
69
|
|
|
|
|
144
|
|
|
69
|
|
|
|
|
1949
|
|
3
|
69
|
|
|
69
|
|
337
|
use warnings; |
|
69
|
|
|
|
|
828
|
|
|
69
|
|
|
|
|
3146
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
69
|
|
|
69
|
|
204
|
$Math::Prime::Util::MemFree::AUTHORITY = 'cpan:DANAJ'; |
7
|
69
|
|
|
|
|
1227
|
$Math::Prime::Util::MemFree::VERSION = '0.69'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
69
|
|
|
69
|
|
367
|
use base qw( Exporter ); |
|
69
|
|
|
|
|
134
|
|
|
69
|
|
|
|
|
9007
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( ); |
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
69
|
|
|
69
|
|
460
|
use Math::Prime::Util; |
|
69
|
|
|
|
|
122
|
|
|
69
|
|
|
|
|
375
|
|
16
|
69
|
|
|
69
|
|
400
|
use Carp qw/carp croak confess/; |
|
69
|
|
|
|
|
145
|
|
|
69
|
|
|
|
|
8885
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $memfree_instances = 0; |
19
|
|
|
|
|
|
|
sub new { |
20
|
8
|
|
|
8
|
1
|
19
|
my $self = bless {}, shift; |
21
|
8
|
|
|
|
|
14
|
$memfree_instances++; |
22
|
8
|
|
|
|
|
39
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
sub DESTROY { |
25
|
8
|
|
|
8
|
|
32792
|
my $self = shift; |
26
|
8
|
50
|
|
|
|
27
|
confess "instances count mismatch" unless $memfree_instances > 0; |
27
|
8
|
100
|
|
|
|
469
|
Math::Prime::Util::prime_memfree if --$memfree_instances == 0; |
28
|
8
|
|
|
|
|
91
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |