| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
330
|
use 5.12.0; |
|
|
1
|
|
|
|
|
3
|
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
34
|
|
|
3
|
|
|
|
|
|
|
package more 0.204; |
|
4
|
|
|
|
|
|
|
# ABSTRACT: use more of a resource |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use less 0.03 (); |
|
|
1
|
|
|
|
|
11
|
|
|
|
1
|
|
|
|
|
17
|
|
|
7
|
1
|
|
|
1
|
|
3
|
use parent 'less'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
3
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
1; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=pod |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=encoding UTF-8 |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
more - use more of a resource |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 VERSION |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
version 0.204 |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use more 'variables'; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
As of perl5 version 10, the long-useless pragma L became a usable tool |
|
30
|
|
|
|
|
|
|
for indicating that less I could be used. For example, the user |
|
31
|
|
|
|
|
|
|
could specify that less memory should be used, and other libraries could then |
|
32
|
|
|
|
|
|
|
choose between multiple algorithms based on that choice. |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
In the user's program: |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use less 'memory'; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $result = Analyzer->analyze( $large_data_set ); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
In the library: |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub analyze { |
|
43
|
|
|
|
|
|
|
my ($self, $data) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $cache = less->of('memory') ? 'disk' : 'ram'; |
|
46
|
|
|
|
|
|
|
my $method = "analyze_with_${cache}_cache"; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
return $self->$method($data); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This allowed for an explosion of highly adaptive implementions, accounting for |
|
52
|
|
|
|
|
|
|
a complex matrix of "less" interactions. Unfortunately, there is no mechanism |
|
53
|
|
|
|
|
|
|
for requesting that I of something be used, to help do our part as good |
|
54
|
|
|
|
|
|
|
consumers. The often-heard advice to simply write C<< no less 'spending' >> is |
|
55
|
|
|
|
|
|
|
insufficient. That only means we should maintain our current levels. We want |
|
56
|
|
|
|
|
|
|
to request an increase. |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This library corrects this deficiency by allowing the user to write: |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
use more 'spending'; |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 PERL VERSION |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This module should work on any version of perl still receiving updates from |
|
65
|
|
|
|
|
|
|
the Perl 5 Porters. This means it should work on any version of perl released |
|
66
|
|
|
|
|
|
|
in the last two to three years. (That is, if the most recently released |
|
67
|
|
|
|
|
|
|
version is v5.40, then this module should work on both v5.40 and v5.38.) |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Although it may work on older versions of perl, no guarantee is made that the |
|
70
|
|
|
|
|
|
|
minimum required version will not be increased. The version may be increased |
|
71
|
|
|
|
|
|
|
for any reason, and there is no promise that patches will be accepted to lower |
|
72
|
|
|
|
|
|
|
the minimum required perl. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHOR |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Ricardo SIGNES |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Ricardo SIGNES. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
83
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |