| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
1132
|
use 5.008001; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
108
|
|
|
2
|
|
|
|
|
|
|
package App::cpanurl; |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
1; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
App::cpanurl - Get distribution URL from module name and version |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 CAUTION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
B |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
(2013/3/20) |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Sorry. This module is DEPRECATED because L and L is much better. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
If you want to install moudles, use L and L instead. |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
See L |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module will be removed from CPAN on 2014/3/1 |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz |
|
29
|
|
|
|
|
|
|
cpanurl Mojolicious 3.82 |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# http://cpan.metacpan.org/authors/id/G/GA/GAAS/libwww-perl-6.04.tar.gz |
|
32
|
|
|
|
|
|
|
cpanurl LWP 6.04 |
|
33
|
|
|
|
|
|
|
cpanurl libwww-perl-6.04 |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz |
|
36
|
|
|
|
|
|
|
# http://cpan.metacpan.org/authors/id/K/KI/KIMOTO/DBIx-Custom-0.23.tar.gz |
|
37
|
|
|
|
|
|
|
cpanurl -f module.txt |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# module.txt |
|
40
|
|
|
|
|
|
|
Mojolicious 3.82 |
|
41
|
|
|
|
|
|
|
DBIx::Custom 0.23 |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTIONS |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 Get module URL |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
You can get module URL. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz |
|
50
|
|
|
|
|
|
|
cpanurl Mojolicious 3.82 |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
If you want to get many module urls, you can use C<-f> option and module file. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
cpanurl -f module.txt |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Module file is the following format. |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Mojolicious 3.82 |
|
59
|
|
|
|
|
|
|
DBIx::Custom 0.23 |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
You can get the following output |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz |
|
64
|
|
|
|
|
|
|
http://cpan.metacpan.org/authors/id/K/KI/KIMOTO/DBIx-Custom-0.23.tar.gz |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 Module installation |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Use L with C to install modules. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
cpanurl Mojolicious 3.82 | cpanm |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
If you want to install many modules, you can create module file. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# module.txt |
|
75
|
|
|
|
|
|
|
Mojolicious 3.82 |
|
76
|
|
|
|
|
|
|
DBIx::Custom 0.23 |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
And use C<-f> option to read this file. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
cpanurl -f module.txt | cpanm |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 Module name is different from distribution name |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Some module name is different from disttribution name. |
|
85
|
|
|
|
|
|
|
C is automatically resolve this relation. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
# Module name Distribution name |
|
88
|
|
|
|
|
|
|
LWP libwww-perl |
|
89
|
|
|
|
|
|
|
IO::Compress::Base IO-Compress |
|
90
|
|
|
|
|
|
|
Cwd PathTools |
|
91
|
|
|
|
|
|
|
File::Spec PathTools |
|
92
|
|
|
|
|
|
|
List::Util Scalar-List-Utils |
|
93
|
|
|
|
|
|
|
Scalar::Util Scalar-List-Utils |
|
94
|
|
|
|
|
|
|
Template Template-Toolkit |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
If you want to use distribution name, pass one argument. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
cpanurl libwww-perl-6.04 |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
You can use Module name or distribution name. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# both OK |
|
103
|
|
|
|
|
|
|
cpanurl LWP 6.04 |
|
104
|
|
|
|
|
|
|
cpanurl libwww-perl-6.04 |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# both OK |
|
107
|
|
|
|
|
|
|
cpanurl Cwd 3.40 |
|
108
|
|
|
|
|
|
|
cpanurl PathTools-3.40 |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 When URL is passwd to argument |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
cpanurl http://somehost.com/Foo-0.01.tar.gz |
|
113
|
|
|
|
|
|
|
cpanurl https://somehost.com/Foo-0.01.tar.gz |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
If URL which start C or C is passed to argument, |
|
116
|
|
|
|
|
|
|
That URL is passed through to output. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
# Output |
|
119
|
|
|
|
|
|
|
http://somehost.com/Foo-0.01.tar.gz |
|
120
|
|
|
|
|
|
|
https://somehost.com/Foo-0.01.tar.gz |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 HTTP client |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
L use two HTTP client as necessary. |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over 2 |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item 1. LWP::UserAgent |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item 2. HTTP::Tiny |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
These module is used to get module URLs from metaCPAN. |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
If L 5.802+ is installed, L |
|
137
|
|
|
|
|
|
|
is seleced. If not, L is selected. |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
C<--lwp> option force L. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
cpanurl --lwp Mojolicious 3.82 |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
C<--no-lwp> option force L. |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
cpanurl --no-lwp Mojolicious 3.82 |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 HTTP proxy |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
export http_proxy=http://hostname:3001 |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
C environment variable enable you to use proxy server. |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 HTTP proxy authentication |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
export http_proxy=http://username:password@hostname:3001 |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
If L 5.802+ is installed, |
|
158
|
|
|
|
|
|
|
proxy authentication is available. |
|
159
|
|
|
|
|
|
|
L don't support proxy authentication. |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Copyright 2013 Yuki Kimoto. |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
166
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
167
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=cut |