forked from DrHyde/CPANdeps
/
cpandeps.tt2
256 lines (231 loc) · 10 KB
/
cpandeps.tt2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>CPAN dependencies and test results checker[% IF module %]: [% module %][% END %]</title>
<link rel="stylesheet" type="text/css" href="static/style.css" />
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="Search module dependencies" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15765130-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</head>
<body>
<script type='text/javascript'><!--
var what_i_hid_when = [];
function getElementsByClassName(classname) {
var allelements = document.getElementsByTagName("*");
var myelements = [];
var re = new RegExp('\\$' + classname + '\\$');
for(var i=0; i< allelements.length; i++)
if(re.test(allelements[i].className)) myelements.push(allelements[i]);
return myelements;
}
function toggle(class_to_toggle, cell_to_change) {
var cell = document.getElementById(cell_to_change);
if(cell.innerHTML == '-') { hide(class_to_toggle, cell_to_change); }
else { show(cell_to_change); }
cell.innerHTML = cell.innerHTML == '-' ? '+' : '-';
}
function show(cell_to_change) {
for(var i = 0; i < what_i_hid_when[cell_to_change].length; i++) {
what_i_hid_when[cell_to_change][i].style.display = 'table-row';
}
}
function hide(class_to_toggle, cell_to_change) {
what_i_hid_when[cell_to_change] = [];
var objects_to_toggle = getElementsByClassName(class_to_toggle);
for(var i = 0; i < objects_to_toggle.length; i++) {
var obj = objects_to_toggle[i];
if(obj.style.display != 'none') {
obj.style.display = 'none';
what_i_hid_when[cell_to_change].push(obj);
}
}
}
// -->
</script>
<h1> CPAN Dependencies </h1>
<div id="menu">
<a href="https://github.com/DrHyde/CPANdeps" class="first">Source code</a>
<a href="https://github.com/DrHyde/CPANdeps/issues/new">Report a bug in this site</a>
<a href="/static/credits.html">Credits</a>
<a href="depended-on-by.pl">Reverse lookup</a>
<a href="static/links.html" class="last">Links</a>
</div>
<p>Given a <strong>module name</strong>, this service will show you
its dependencies
along with a summary of their test results from the CPAN testers.
The idea is that if you have
a choice of several modules to use, this will show you which is the
most reliable.
</p>
<fieldset class="search">
<legend>Search</legend>
<form class="search" method="get" action=".">
<table>
<tr>
<th align="right"><label for="module">Module</label></th>
<td><input type="text" id="module" name="module" value="[% module | html %]" /></td>
<th align="right"><label for="perl">Perl</label></th>
<td><select id="perl" name="perl">
[% FOREACH thisperl = perls %]
<option value="[% thisperl %]" [% IF thisperl == perl %] selected="selected" [% END %]>[% thisperl %]
[% END %]
</select></td>
<th align="right"><label for="os">OS</label></th>
<td><select id="os" name="os">
[% FOREACH thisos = oses %]
<option value="[% thisos %]" [% IF thisos == os %] selected="selected" [% END %]>[% thisos %]
[% END %]
</select></td>
</tr>
<tr>
<td colspan="6">
<input type="checkbox" id="pureperl" name="pureperl" [% IF pureperl %] checked="checked" [% END %]/><label for="pureperl" title="warn about modules which have a C component, ie those that aren't 'pure perl'">purity warnings<a style='color:#f00' href="static/purity.html">(?)</a></label>
<input type="checkbox" id="devperls" name="devperls" [% IF devperls %] checked="checked" [% END %]/><label for="devperls">Include dev builds of perl?</label>
</td>
</tr>
<tr><th colspan="6" align="right"><input type="submit" /></th></tr>
</table>
</form>
</fieldset>
[% IF module %]
<!-- Main results table -->
<fieldset class="results">
<legend>Results</legend>
<small class="xml">
(<a href="?xml=1;module=[% module | html %];perl=[% perl %];os=[% os | html %];pureperl=[% pureperl %]">Get results in XML</a>)
</small>
[% successpc = 100 %]
<table class="results">
<tr> <!-- headers -->
<th width="10"> </th>
<th align="left">Module</th>
<th width="100"> </th>
<th width="200" align="left">Pass rate</th>
<th width="50">Pass</th>
<th width="50">Unknown</th>
<th width="50">Fail</th>
<th width="50">NA</th>
</tr>
[% depcounter = -1 %]
[% FOREACH thismodule = modules %]
[% depcounter = depcounter + 1 %]
[% INCLUDE 'moduleresult.tt2' module = thismodule reqmodule = module %]
[% IF !thismodule.textresult %]
[% IF thismodule.pass + thismodule.unknown + thismodule.fail + thismodule.na %]
[% successpc = successpc * thismodule.pass /
(thismodule.pass + thismodule.unknown + thismodule.fail + thismodule.na) %]
[% END %]
[% END %]
[% END %]
[% IF modules.size %]
<!-- CHANCES OF ALL TEST PASSING -->
<tr> </tr>
<tr class="results_chances">
<th colspan="3" valign="bottom" align="center">Chance of all tests passing</th>
<td colspan="1" ><img src="static/green.png" height="16" width="[% successpc * 2 %]"><img src="static/red.png" height="16" width="[% 200 - successpc * 2 %]">
</td>
<td colspan="4">
[% IF successpc < 1 %]
[% successpc.sprintf("%.3f") %]% (to 3dp)
[% ELSIF successpc < 10 %]
[% successpc.sprintf("%.1f") %]% (to 1dp)
[% ELSE %]
[% successpc.int %]%
[% END %] <small>(<a style='color:#f00' href="static/overall-chance.html">note</a> this doesn't mean much)</small>
</td>
</tr>
[% ELSE %]
<tr>
<th>No results.</th>
<td colspan="6">make sure you enter a valid module name</td>
</tr>
[% END %]
<tr>
<td colspan="8"><small class="results_disclaimer">The chance of success is calculated by multiplying the probabilities of the module and all its dependencies passing their tests.</small>
</td>
</tr>
<tr class="key">
<td colspan="8">
Key :
<img src="static/search.png" /> = Search
<img src="static/bug.png" /> = Bug reports
<img src="static/tick.png" /> = Test results
<img src="static/depended.png" /> = Reverse dependencies
<img src="static/graph.png" /> = OS/Perl results matrix
</td>
</tr>
<!-- CLOSE THE TABLE -->
</table>
</fieldset>
<!-- end of main results table -->
[% END %]
<p>Please note: this site is a tool to analyse the dependencies of modules written in the Perl programming language. I can not help you with any problems you might have with using any modules.</p>
<p>It relies on modules having META.yml or META.json files so it can work
out their dependencies, and is <strong>case-sensitive</strong>.
The perl version number is used to filter test results and also to
<a href="/?module=XML%3A%3AFeed&perl=5.8.8">determine what's a core
module</a> and what's not - some core modules
also exist separately on the CPAN, but we don't bother looking at
their dependencies. If you choose a version like X.Y as opposed to
X.Y.Z, then you'll get test results for all X.Y.* versions, and we
<a href="/?module=XML%3A%3AFeed&perl=5.8">assume X.Y.<strong>0</strong>
for figuring out what's in core</a>. If you
choose 'any version', then you get all test results and we
<a href="/?module=XML%3A%3AFeed">divine
core modules from perl <strong>5.005</strong></a>. Test results are
cached for performance and may be up to three days out of date.
Modules can depend
on particular versions of other modules. We ignore that. Patches welcome.
</p>
<div id="footer">
<table class="donation">
<tr>
<td width="100" align="center">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="david@cantrell.org.uk" />
<input type="hidden" name="item_name" value="CPANdeps" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="tax" value="0" />
<input type="image" src="/static/paypal_donate_button.png" border="0" name="submit" width="100" height="48" alt="Make a donation with PayPal" />
</form>
</td>
<td>
<a class="FlattrButton" style="display:none;" href="http://deps.cpantesters.org/"></a>
<noscript><a href="http://flattr.com/thing/423225/CPANdeps" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>
</td>
</tr>
</table>
If you think this service rocks
incredibly hard, then I like
<a href="http://www.cantrell.org.uk/david/wishlist/">shiny beads</a>,
but wouldn't say no to a little something to help defray costs either.
<br/><br/>Hosted on <a href="http://www.uk2.net/dedicated-servers/">dedicated servers</a> from UK2.net
<br clear="both"/>
[% debug.replace("\n","<br/>").replace(" "," "); %]
</div>
</body>
</html>