line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::CPAN::Search; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
77423
|
use strict; |
|
4
|
|
|
|
|
27
|
|
|
4
|
|
|
|
|
117
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
94
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
5473
|
use CPAN; |
|
4
|
|
|
|
|
1267679
|
|
|
4
|
|
|
|
|
2456
|
|
7
|
4
|
|
|
4
|
|
12088
|
use Getopt::Std; |
|
4
|
|
|
|
|
283
|
|
|
4
|
|
|
|
|
1526
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.09; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Constructor. |
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
1
|
1963
|
my ($class, @params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Create object. |
16
|
2
|
|
|
|
|
8
|
my $self = bless {}, $class; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Object. |
19
|
2
|
|
|
|
|
10
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Run. |
23
|
|
|
|
|
|
|
sub run { |
24
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Process arguments. |
27
|
1
|
|
|
|
|
10
|
$self->{'_opts'} = { |
28
|
|
|
|
|
|
|
'h' => 0, |
29
|
|
|
|
|
|
|
}; |
30
|
1
|
50
|
33
|
|
|
7
|
if (! getopts('h', $self->{'_opts'}) || @ARGV < 1 |
|
|
|
33
|
|
|
|
|
31
|
|
|
|
|
|
|
|| $self->{'_opts'}->{'h'}) { |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
120
|
print STDERR "Usage: $0 [-h] [--version] module_prefix\n"; |
34
|
1
|
|
|
|
|
16
|
print STDERR "\t-h\t\tPrint help.\n"; |
35
|
1
|
|
|
|
|
13
|
print STDERR "\t--version\tPrint version.\n"; |
36
|
1
|
|
|
|
|
14
|
print STDERR "\tmodule_prefix\tModule prefix. e.g. ". |
37
|
|
|
|
|
|
|
"Module::Install\n"; |
38
|
1
|
|
|
|
|
7
|
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__ |