line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::CPAN::Search; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
74074
|
use strict; |
|
4
|
|
|
|
|
25
|
|
|
4
|
|
|
|
|
113
|
|
4
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
94
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
4520
|
use CPAN; |
|
4
|
|
|
|
|
1224757
|
|
|
4
|
|
|
|
|
2112
|
|
7
|
4
|
|
|
4
|
|
10047
|
use Getopt::Std; |
|
4
|
|
|
|
|
234
|
|
|
4
|
|
|
|
|
1431
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.07; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Constructor. |
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
1
|
1673
|
my ($class, @params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Create object. |
16
|
2
|
|
|
|
|
7
|
my $self = bless {}, $class; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Object. |
19
|
2
|
|
|
|
|
9
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Run. |
23
|
|
|
|
|
|
|
sub run { |
24
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Process arguments. |
27
|
1
|
|
|
|
|
9
|
$self->{'_opts'} = { |
28
|
|
|
|
|
|
|
'h' => 0, |
29
|
|
|
|
|
|
|
}; |
30
|
1
|
50
|
33
|
|
|
5
|
if (! getopts('h', $self->{'_opts'}) || @ARGV < 1 |
|
|
|
33
|
|
|
|
|
31
|
|
|
|
|
|
|
|| $self->{'_opts'}->{'h'}) { |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
132
|
print STDERR "Usage: $0 [-h] [--version] module_prefix\n"; |
34
|
1
|
|
|
|
|
16
|
print STDERR "\t-h\t\tPrint help.\n"; |
35
|
1
|
|
|
|
|
12
|
print STDERR "\t--version\tPrint version.\n"; |
36
|
1
|
|
|
|
|
12
|
print STDERR "\tmodule_prefix\tModule prefix. e.g. ". |
37
|
|
|
|
|
|
|
"Module::Install\n"; |
38
|
1
|
|
|
|
|
6
|
return 1; |
39
|
|
|
|
|
|
|
} |
40
|
0
|
|
|
|
|
|
$self->{'_module_prefix'} = shift @ARGV; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Print all modules with prefix. |
43
|
|
|
|
|
|
|
# XXX Rewrite to something nice. |
44
|
0
|
|
|
|
|
|
CPAN::Shell->m("/^$self->{'_module_prefix'}/"); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return 0; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |