line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MediaWiki::Bot::Constants; |
2
|
44
|
|
|
44
|
|
165
|
use strict; |
|
44
|
|
|
|
|
56
|
|
|
44
|
|
|
|
|
1373
|
|
3
|
44
|
|
|
44
|
|
143
|
use warnings; |
|
44
|
|
|
|
|
40
|
|
|
44
|
|
|
|
|
1681
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: constants for MediaWiki::Bot |
5
|
|
|
|
|
|
|
our $VERSION = '5.006003'; # VERSION |
6
|
|
|
|
|
|
|
|
7
|
44
|
|
|
44
|
|
152
|
use MediaWiki::API; # How to grab these constants? |
|
44
|
|
|
|
|
55
|
|
|
44
|
|
|
|
|
3461
|
|
8
|
|
|
|
|
|
|
use Constant::Generate { |
9
|
44
|
|
|
|
|
2236
|
ERR_NO_ERROR => MediaWiki::API->ERR_NO_ERROR, |
10
|
|
|
|
|
|
|
ERR_CONFIG => MediaWiki::API->ERR_CONFIG, |
11
|
|
|
|
|
|
|
ERR_HTTP => MediaWiki::API->ERR_HTTP, |
12
|
|
|
|
|
|
|
ERR_API => MediaWiki::API->ERR_API, |
13
|
|
|
|
|
|
|
ERR_LOGIN => MediaWiki::API->ERR_LOGIN, |
14
|
|
|
|
|
|
|
ERR_EDIT => MediaWiki::API->ERR_EDIT, |
15
|
|
|
|
|
|
|
ERR_PARAMS => MediaWiki::API->ERR_PARAMS, |
16
|
|
|
|
|
|
|
ERR_UPLOAD => MediaWiki::API->ERR_UPLOAD, |
17
|
|
|
|
|
|
|
ERR_DOWNLOAD => MediaWiki::API->ERR_DOWNLOAD, |
18
|
|
|
|
|
|
|
ERR_CAPTCHA => 10, |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
RET_TRUE => !!1, |
21
|
|
|
|
|
|
|
RET_FALSE => !!0, |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
PAGE_NONEXISTENT => -1, |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
FILE_NONEXISTENT => 0, |
26
|
|
|
|
|
|
|
FILE_LOCAL => 1, |
27
|
|
|
|
|
|
|
FILE_SHARED => 2, |
28
|
|
|
|
|
|
|
FILE_PAGE_TEXT_ONLY => 3, |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
NS_USER => 2, |
31
|
|
|
|
|
|
|
NS_FILE => 6, |
32
|
|
|
|
|
|
|
NS_CATEGORY => 14, |
33
|
|
|
|
|
|
|
|
34
|
44
|
|
|
44
|
|
19050
|
};#, dualvar => 1; |
|
44
|
|
|
|
|
347128
|
|
35
|
|
|
|
|
|
|
|
36
|
44
|
|
|
44
|
|
14453
|
use Exporter qw(import); |
|
44
|
|
|
|
|
68
|
|
|
44
|
|
|
|
|
5602
|
|
37
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
38
|
|
|
|
|
|
|
err => [qw( |
39
|
|
|
|
|
|
|
ERR_NO_ERROR |
40
|
|
|
|
|
|
|
ERR_CONFIG |
41
|
|
|
|
|
|
|
ERR_HTTP |
42
|
|
|
|
|
|
|
ERR_API |
43
|
|
|
|
|
|
|
ERR_LOGIN |
44
|
|
|
|
|
|
|
ERR_EDIT |
45
|
|
|
|
|
|
|
ERR_PARAMS |
46
|
|
|
|
|
|
|
ERR_UPLOAD |
47
|
|
|
|
|
|
|
ERR_DOWNLOAD |
48
|
|
|
|
|
|
|
ERR_CAPTCHA |
49
|
|
|
|
|
|
|
)], |
50
|
|
|
|
|
|
|
bool => [qw( RET_TRUE RET_FALSE )], |
51
|
|
|
|
|
|
|
page => [qw( PAGE_NONEXISTENT )], |
52
|
|
|
|
|
|
|
file => [qw( FILE_NONEXISTENT FILE_LOCAL FILE_SHARED FILE_PAGE_TEXT_ONLY )], |
53
|
|
|
|
|
|
|
ns => [qw( NS_USER NS_FILE NS_CATEGORY )], |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Exporter::export_tags(qw(err)); |
57
|
|
|
|
|
|
|
Exporter::export_ok_tags(qw(bool page file ns)); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
{ |
60
|
|
|
|
|
|
|
my %seen; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
push @{$EXPORT_TAGS{all}}, |
63
|
|
|
|
|
|
|
grep {!$seen{$_}++} @{$EXPORT_TAGS{$_}} foreach keys %EXPORT_TAGS; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |