line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
72296
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
2
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
110
|
|
3
|
|
|
|
|
|
|
package App::Nopaste::Service::Debian; |
4
|
|
|
|
|
|
|
# ABSTRACT: Service provider for Debian - https://paste.debian.net/ |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.011'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
358
|
use parent 'App::Nopaste::Service'; |
|
2
|
|
|
|
|
359
|
|
|
2
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $languages = { |
11
|
|
|
|
|
|
|
"text" => "-1", |
12
|
|
|
|
|
|
|
"abap" => "abap", |
13
|
|
|
|
|
|
|
"ada" => "ada", |
14
|
|
|
|
|
|
|
"ahk" => "ahk", |
15
|
|
|
|
|
|
|
"antlr" => "antlr", |
16
|
|
|
|
|
|
|
"antlr-as" => "antlr-as", |
17
|
|
|
|
|
|
|
"antlr-cpp" => "antlr-cpp", |
18
|
|
|
|
|
|
|
"antlr-csharp" => "antlr-csharp", |
19
|
|
|
|
|
|
|
"antlr-java" => "antlr-java", |
20
|
|
|
|
|
|
|
"antlr-objc" => "antlr-objc", |
21
|
|
|
|
|
|
|
"antlr-perl" => "antlr-perl", |
22
|
|
|
|
|
|
|
"antlr-python" => "antlr-python", |
23
|
|
|
|
|
|
|
"antlr-ruby" => "antlr-ruby", |
24
|
|
|
|
|
|
|
"apacheconf" => "apacheconf", |
25
|
|
|
|
|
|
|
"applescript" => "applescript", |
26
|
|
|
|
|
|
|
"as" => "as", |
27
|
|
|
|
|
|
|
"as3" => "as3", |
28
|
|
|
|
|
|
|
"aspx-cs" => "aspx-cs", |
29
|
|
|
|
|
|
|
"aspx-vb" => "aspx-vb", |
30
|
|
|
|
|
|
|
"asy" => "asy", |
31
|
|
|
|
|
|
|
"awk" => "awk", |
32
|
|
|
|
|
|
|
"basemake" => "basemake", |
33
|
|
|
|
|
|
|
"bash" => "bash", |
34
|
|
|
|
|
|
|
"bat" => "bat", |
35
|
|
|
|
|
|
|
"bbcode" => "bbcode", |
36
|
|
|
|
|
|
|
"befunge" => "befunge", |
37
|
|
|
|
|
|
|
"blitzmax" => "blitzmax", |
38
|
|
|
|
|
|
|
"boo" => "boo", |
39
|
|
|
|
|
|
|
"brainfuck" => "brainfuck", |
40
|
|
|
|
|
|
|
"bro" => "bro", |
41
|
|
|
|
|
|
|
"c" => "c", |
42
|
|
|
|
|
|
|
"cfengine3" => "cfengine3", |
43
|
|
|
|
|
|
|
"cfm" => "cfm", |
44
|
|
|
|
|
|
|
"cfs" => "cfs", |
45
|
|
|
|
|
|
|
"cheetah" => "cheetah", |
46
|
|
|
|
|
|
|
"clojure" => "clojure", |
47
|
|
|
|
|
|
|
"cmake" => "cmake", |
48
|
|
|
|
|
|
|
"c-objdump" => "c-objdump", |
49
|
|
|
|
|
|
|
"coffee-script" => "coffee-script", |
50
|
|
|
|
|
|
|
"common-lisp" => "common-lisp", |
51
|
|
|
|
|
|
|
"console" => "console", |
52
|
|
|
|
|
|
|
"control" => "control", |
53
|
|
|
|
|
|
|
"coq" => "coq", |
54
|
|
|
|
|
|
|
"cpp" => "cpp", |
55
|
|
|
|
|
|
|
"cpp-objdump" => "cpp-objdump", |
56
|
|
|
|
|
|
|
"csharp" => "csharp", |
57
|
|
|
|
|
|
|
"css" => "css", |
58
|
|
|
|
|
|
|
"css+django" => "css+django", |
59
|
|
|
|
|
|
|
"css+erb" => "css+erb", |
60
|
|
|
|
|
|
|
"css+genshitext" => "css+genshitext", |
61
|
|
|
|
|
|
|
"css+mako" => "css+mako", |
62
|
|
|
|
|
|
|
"css+myghty" => "css+myghty", |
63
|
|
|
|
|
|
|
"css+php" => "css+php", |
64
|
|
|
|
|
|
|
"css+smarty" => "css+smarty", |
65
|
|
|
|
|
|
|
"Cucumber" => "Cucumber", |
66
|
|
|
|
|
|
|
"cython" => "cython", |
67
|
|
|
|
|
|
|
"d" => "d", |
68
|
|
|
|
|
|
|
"dart" => "dart", |
69
|
|
|
|
|
|
|
"delphi" => "delphi", |
70
|
|
|
|
|
|
|
"diff" => "diff", |
71
|
|
|
|
|
|
|
"django" => "django", |
72
|
|
|
|
|
|
|
"d-objdump" => "d-objdump", |
73
|
|
|
|
|
|
|
"dpatch" => "dpatch", |
74
|
|
|
|
|
|
|
"dtd" => "dtd", |
75
|
|
|
|
|
|
|
"duel" => "duel", |
76
|
|
|
|
|
|
|
"dylan" => "dylan", |
77
|
|
|
|
|
|
|
"ec" => "ec", |
78
|
|
|
|
|
|
|
"ecl" => "ecl", |
79
|
|
|
|
|
|
|
"elixir" => "elixir", |
80
|
|
|
|
|
|
|
"erb" => "erb", |
81
|
|
|
|
|
|
|
"erl" => "erl", |
82
|
|
|
|
|
|
|
"erlang" => "erlang", |
83
|
|
|
|
|
|
|
"evoque" => "evoque", |
84
|
|
|
|
|
|
|
"factor" => "factor", |
85
|
|
|
|
|
|
|
"fan" => "fan", |
86
|
|
|
|
|
|
|
"fancy" => "fancy", |
87
|
|
|
|
|
|
|
"felix" => "felix", |
88
|
|
|
|
|
|
|
"fortran" => "fortran", |
89
|
|
|
|
|
|
|
"fsharp" => "fsharp", |
90
|
|
|
|
|
|
|
"gas" => "gas", |
91
|
|
|
|
|
|
|
"genshi" => "genshi", |
92
|
|
|
|
|
|
|
"genshitext" => "genshitext", |
93
|
|
|
|
|
|
|
"glsl" => "glsl", |
94
|
|
|
|
|
|
|
"gnuplot" => "gnuplot", |
95
|
|
|
|
|
|
|
"go" => "go", |
96
|
|
|
|
|
|
|
"gooddata-cl" => "gooddata-cl", |
97
|
|
|
|
|
|
|
"gosu" => "gosu", |
98
|
|
|
|
|
|
|
"groff" => "groff", |
99
|
|
|
|
|
|
|
"groovy" => "groovy", |
100
|
|
|
|
|
|
|
"gst" => "gst", |
101
|
|
|
|
|
|
|
"haml" => "haml", |
102
|
|
|
|
|
|
|
"haskell" => "haskell", |
103
|
|
|
|
|
|
|
"html" => "html", |
104
|
|
|
|
|
|
|
"html+cheetah" => "html+cheetah", |
105
|
|
|
|
|
|
|
"html+django" => "html+django", |
106
|
|
|
|
|
|
|
"html+evoque" => "html+evoque", |
107
|
|
|
|
|
|
|
"html+genshi" => "html+genshi", |
108
|
|
|
|
|
|
|
"html+mako" => "html+mako", |
109
|
|
|
|
|
|
|
"html+myghty" => "html+myghty", |
110
|
|
|
|
|
|
|
"html+php" => "html+php", |
111
|
|
|
|
|
|
|
"html+smarty" => "html+smarty", |
112
|
|
|
|
|
|
|
"html+velocity" => "html+velocity", |
113
|
|
|
|
|
|
|
"http" => "http", |
114
|
|
|
|
|
|
|
"hx" => "hx", |
115
|
|
|
|
|
|
|
"hybris" => "hybris", |
116
|
|
|
|
|
|
|
"iex" => "iex", |
117
|
|
|
|
|
|
|
"ini" => "ini", |
118
|
|
|
|
|
|
|
"io" => "io", |
119
|
|
|
|
|
|
|
"ioke" => "ioke", |
120
|
|
|
|
|
|
|
"irc" => "irc", |
121
|
|
|
|
|
|
|
"jade" => "jade", |
122
|
|
|
|
|
|
|
"java" => "java", |
123
|
|
|
|
|
|
|
"js" => "js", |
124
|
|
|
|
|
|
|
"js+cheetah" => "js+cheetah", |
125
|
|
|
|
|
|
|
"js+django" => "js+django", |
126
|
|
|
|
|
|
|
"js+erb" => "js+erb", |
127
|
|
|
|
|
|
|
"js+genshitext" => "js+genshitext", |
128
|
|
|
|
|
|
|
"js+mako" => "js+mako", |
129
|
|
|
|
|
|
|
"js+myghty" => "js+myghty", |
130
|
|
|
|
|
|
|
"json" => "json", |
131
|
|
|
|
|
|
|
"jsp" => "jsp", |
132
|
|
|
|
|
|
|
"js+php" => "js+php", |
133
|
|
|
|
|
|
|
"js+smarty" => "js+smarty", |
134
|
|
|
|
|
|
|
"kotlin" => "kotlin", |
135
|
|
|
|
|
|
|
"lhs" => "lhs", |
136
|
|
|
|
|
|
|
"lighty" => "lighty", |
137
|
|
|
|
|
|
|
"llvm" => "llvm", |
138
|
|
|
|
|
|
|
"logtalk" => "logtalk", |
139
|
|
|
|
|
|
|
"lua" => "lua", |
140
|
|
|
|
|
|
|
"make" => "make", |
141
|
|
|
|
|
|
|
"mako" => "mako", |
142
|
|
|
|
|
|
|
"maql" => "maql", |
143
|
|
|
|
|
|
|
"mason" => "mason", |
144
|
|
|
|
|
|
|
"matlab" => "matlab", |
145
|
|
|
|
|
|
|
"matlabsession" => "matlabsession", |
146
|
|
|
|
|
|
|
"minid" => "minid", |
147
|
|
|
|
|
|
|
"modelica" => "modelica", |
148
|
|
|
|
|
|
|
"modula2" => "modula2", |
149
|
|
|
|
|
|
|
"moocode" => "moocode", |
150
|
|
|
|
|
|
|
"moon" => "moon", |
151
|
|
|
|
|
|
|
"mupad" => "mupad", |
152
|
|
|
|
|
|
|
"mxml" => "mxml", |
153
|
|
|
|
|
|
|
"myghty" => "myghty", |
154
|
|
|
|
|
|
|
"mysql" => "mysql", |
155
|
|
|
|
|
|
|
"nasm" => "nasm", |
156
|
|
|
|
|
|
|
"nemerle" => "nemerle", |
157
|
|
|
|
|
|
|
"newlisp" => "newlisp", |
158
|
|
|
|
|
|
|
"newspeak" => "newspeak", |
159
|
|
|
|
|
|
|
"nginx" => "nginx", |
160
|
|
|
|
|
|
|
"nimrod" => "nimrod", |
161
|
|
|
|
|
|
|
"numpy" => "numpy", |
162
|
|
|
|
|
|
|
"objdump" => "objdump", |
163
|
|
|
|
|
|
|
"objective-c" => "objective-c", |
164
|
|
|
|
|
|
|
"objective-j" => "objective-j", |
165
|
|
|
|
|
|
|
"ocaml" => "ocaml", |
166
|
|
|
|
|
|
|
"octave" => "octave", |
167
|
|
|
|
|
|
|
"ooc" => "ooc", |
168
|
|
|
|
|
|
|
"opa" => "opa", |
169
|
|
|
|
|
|
|
"openedge" => "openedge", |
170
|
|
|
|
|
|
|
"perl" => "perl", |
171
|
|
|
|
|
|
|
"php" => "php", |
172
|
|
|
|
|
|
|
"plpgsql" => "plpgsql", |
173
|
|
|
|
|
|
|
"postgresql" => "postgresql", |
174
|
|
|
|
|
|
|
"postscript" => "postscript", |
175
|
|
|
|
|
|
|
"pot" => "pot", |
176
|
|
|
|
|
|
|
"pov" => "pov", |
177
|
|
|
|
|
|
|
"powershell" => "powershell", |
178
|
|
|
|
|
|
|
"prolog" => "prolog", |
179
|
|
|
|
|
|
|
"properties" => "properties", |
180
|
|
|
|
|
|
|
"protobuf" => "protobuf", |
181
|
|
|
|
|
|
|
"psql" => "psql", |
182
|
|
|
|
|
|
|
"py3tb" => "py3tb", |
183
|
|
|
|
|
|
|
"pycon" => "pycon", |
184
|
|
|
|
|
|
|
"pypylog" => "pypylog", |
185
|
|
|
|
|
|
|
"pytb" => "pytb", |
186
|
|
|
|
|
|
|
"python" => "python", |
187
|
|
|
|
|
|
|
"python3" => "python3", |
188
|
|
|
|
|
|
|
"ragel" => "ragel", |
189
|
|
|
|
|
|
|
"ragel-c" => "ragel-c", |
190
|
|
|
|
|
|
|
"ragel-cpp" => "ragel-cpp", |
191
|
|
|
|
|
|
|
"ragel-d" => "ragel-d", |
192
|
|
|
|
|
|
|
"ragel-em" => "ragel-em", |
193
|
|
|
|
|
|
|
"ragel-java" => "ragel-java", |
194
|
|
|
|
|
|
|
"ragel-objc" => "ragel-objc", |
195
|
|
|
|
|
|
|
"ragel-ruby" => "ragel-ruby", |
196
|
|
|
|
|
|
|
"raw" => "raw", |
197
|
|
|
|
|
|
|
"rb" => "rb", |
198
|
|
|
|
|
|
|
"rbcon" => "rbcon", |
199
|
|
|
|
|
|
|
"rconsole" => "rconsole", |
200
|
|
|
|
|
|
|
"rebol" => "rebol", |
201
|
|
|
|
|
|
|
"redcode" => "redcode", |
202
|
|
|
|
|
|
|
"rhtml" => "rhtml", |
203
|
|
|
|
|
|
|
"rst" => "rst", |
204
|
|
|
|
|
|
|
"sass" => "sass", |
205
|
|
|
|
|
|
|
"scala" => "scala", |
206
|
|
|
|
|
|
|
"scaml" => "scaml", |
207
|
|
|
|
|
|
|
"scheme" => "scheme", |
208
|
|
|
|
|
|
|
"scilab" => "scilab", |
209
|
|
|
|
|
|
|
"scss" => "scss", |
210
|
|
|
|
|
|
|
"smalltalk" => "smalltalk", |
211
|
|
|
|
|
|
|
"smarty" => "smarty", |
212
|
|
|
|
|
|
|
"sml" => "sml", |
213
|
|
|
|
|
|
|
"snobol" => "snobol", |
214
|
|
|
|
|
|
|
"sourceslist" => "sourceslist", |
215
|
|
|
|
|
|
|
"splus" => "splus", |
216
|
|
|
|
|
|
|
"sql" => "sql", |
217
|
|
|
|
|
|
|
"sqlite3" => "sqlite3", |
218
|
|
|
|
|
|
|
"squidconf" => "squidconf", |
219
|
|
|
|
|
|
|
"ssp" => "ssp", |
220
|
|
|
|
|
|
|
"sv" => "sv", |
221
|
|
|
|
|
|
|
"tcl" => "tcl", |
222
|
|
|
|
|
|
|
"tcsh" => "tcsh", |
223
|
|
|
|
|
|
|
"tea" => "tea", |
224
|
|
|
|
|
|
|
"tex" => "tex", |
225
|
|
|
|
|
|
|
"text" => "text", |
226
|
|
|
|
|
|
|
"trac-wiki" => "trac-wiki", |
227
|
|
|
|
|
|
|
"urbiscript" => "urbiscript", |
228
|
|
|
|
|
|
|
"v" => "v", |
229
|
|
|
|
|
|
|
"vala" => "vala", |
230
|
|
|
|
|
|
|
"vb.net" => "vb.net", |
231
|
|
|
|
|
|
|
"velocity" => "velocity", |
232
|
|
|
|
|
|
|
"vhdl" => "vhdl", |
233
|
|
|
|
|
|
|
"vim" => "vim", |
234
|
|
|
|
|
|
|
"xml" => "xml", |
235
|
|
|
|
|
|
|
"xml+cheetah" => "xml+cheetah", |
236
|
|
|
|
|
|
|
"xml+django" => "xml+django", |
237
|
|
|
|
|
|
|
"xml+erb" => "xml+erb", |
238
|
|
|
|
|
|
|
"xml+evoque" => "xml+evoque", |
239
|
|
|
|
|
|
|
"xml+mako" => "xml+mako", |
240
|
|
|
|
|
|
|
"xml+myghty" => "xml+myghty", |
241
|
|
|
|
|
|
|
"xml+php" => "xml+php", |
242
|
|
|
|
|
|
|
"xml+smarty" => "xml+smarty", |
243
|
|
|
|
|
|
|
"xml+velocity" => "xml+velocity", |
244
|
|
|
|
|
|
|
"xquery" => "xquery", |
245
|
|
|
|
|
|
|
"xslt" => "xslt", |
246
|
|
|
|
|
|
|
"yaml" => "yaml", |
247
|
|
|
|
|
|
|
}; |
248
|
|
|
|
|
|
|
|
249
|
1
|
|
|
1
|
1
|
106
|
sub uri { "https://paste.debian.net/" } |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
sub fill_form { |
252
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
253
|
0
|
|
|
|
|
|
my $mech = shift; |
254
|
0
|
|
|
|
|
|
my %args = @_; |
255
|
0
|
0
|
|
|
|
|
my $lang = $languages->{$args{lang}} if $args{lang}; |
256
|
|
|
|
|
|
|
|
257
|
0
|
|
|
|
|
|
$mech->form_number(1); |
258
|
0
|
0
|
|
|
|
|
if ($args{private}) { |
259
|
0
|
|
|
|
|
|
$mech->tick('private', '1'); |
260
|
|
|
|
|
|
|
} |
261
|
|
|
|
|
|
|
$mech->submit_form( |
262
|
|
|
|
|
|
|
fields => { |
263
|
|
|
|
|
|
|
code => $args{text}, |
264
|
0
|
0
|
|
|
|
|
do { $args{nick} ? (poster => $args{nick}) : () }, |
265
|
0
|
0
|
|
|
|
|
do { $lang ? (lang => $lang) : () }, |
|
0
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
}, |
267
|
|
|
|
|
|
|
); |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
sub return { |
271
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
272
|
0
|
|
|
|
|
|
my $mech = shift; |
273
|
|
|
|
|
|
|
|
274
|
0
|
|
|
|
|
|
my $link = $mech->uri(); |
275
|
|
|
|
|
|
|
|
276
|
0
|
|
|
|
|
|
return (1, $link); |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
1; |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
__END__ |