File: use_lib

package info (click to toggle)
movabletype-opensource 5.1.4%2Bdfsg-4%2Bdeb7u3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 32,996 kB
  • sloc: perl: 197,285; php: 62,405; sh: 166; xml: 117; makefile: 83; sql: 32
file content (237 lines) | stat: -rw-r--r-- 5,914 bytes parent folder | download
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
Description: adjust use lib and similar invocations for Debian package
Origin: vendor
diff --git a/mt-atom.cgi b/mt-atom.cgi
index 8ba50d0..17cfce4 100755
--- a/mt-atom.cgi
+++ b/mt-atom.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::AtomServer';
diff --git a/mt-comments.cgi b/mt-comments.cgi
index 85fd6b3..0956ca7 100755
--- a/mt-comments.cgi
+++ b/mt-comments.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Comments';
diff --git a/mt-feed.cgi b/mt-feed.cgi
index 49d8a70..46457af 100755
--- a/mt-feed.cgi
+++ b/mt-feed.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::ActivityFeeds';
diff --git a/mt-ftsearch.cgi b/mt-ftsearch.cgi
index 62e0937..95d0f25 100755
--- a/mt-ftsearch.cgi
+++ b/mt-ftsearch.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search::FreeText';
diff --git a/mt-search.cgi b/mt-search.cgi
index b56591d..66e51ed 100755
--- a/mt-search.cgi
+++ b/mt-search.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search';
diff --git a/mt-tb.cgi b/mt-tb.cgi
index 549c2f8..47d9846 100755
--- a/mt-tb.cgi
+++ b/mt-tb.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Trackback';
diff --git a/mt-upgrade.cgi b/mt-upgrade.cgi
index 2ba0bca..0eb005c 100755
--- a/mt-upgrade.cgi
+++ b/mt-upgrade.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Upgrader';
diff --git a/mt-wizard.cgi b/mt-wizard.cgi
index 8bf5777..822288f 100755
--- a/mt-wizard.cgi
+++ b/mt-wizard.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Wizard';
diff --git a/mt.cgi b/mt.cgi
index ab26123..27a9d4a 100755
--- a/mt.cgi
+++ b/mt.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::CMS';
diff --git a/tools/convert-db b/tools/convert-db
index 5849ff1..bf97c17 100755
--- a/tools/convert-db
+++ b/tools/convert-db
@@ -12,7 +12,7 @@ use Getopt::Long;
 GetOptions( "old:s" => \my($old_config),
             "new:s" => \my($new_config));
 
-use lib qw( lib extlib );
+use lib '/usr/share/movabletype/extlib';
 use File::Spec;
 use MT;
 
diff --git a/tools/list-objects b/tools/list-objects
index 6662e80..fa6acda 100755
--- a/tools/list-objects
+++ b/tools/list-objects
@@ -2,7 +2,7 @@
 use strict;
 binmode STDOUT, ":utf8";
 
-use lib 'extlib', 'lib', '../lib';
+use lib '/usr/share/movabletype/extlib';
 
 my %opts;
 use Getopt::Long;
diff --git a/tools/mt-tmpl-preview b/tools/mt-tmpl-preview
index 7eeac60..a051120 100755
--- a/tools/mt-tmpl-preview
+++ b/tools/mt-tmpl-preview
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
+use lib '/usr/share/movabletype/extlib';
 
 # establish blog id for cases where we process
 # a template from a file...
@@ -9,7 +10,6 @@ if (!$blog_id) {
     die "Please specify a MT_BLOG shell parameter.";
 }
 
-use lib 'lib';
 use MT::Bootstrap;
 use MT;
 use MT::Template::Context;
diff --git a/tools/plugin-config b/tools/plugin-config
index 4f67a41..2097411 100755
--- a/tools/plugin-config
+++ b/tools/plugin-config
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
+use lib '/usr/share/movabletype/extlib';
 
-use lib 'lib', '../lib';
 use MT::Bootstrap;
 use MT;
 use MT::PluginData;
diff --git a/tools/remove-object b/tools/remove-object
index 5c5074c..93d67c8 100755
--- a/tools/remove-object
+++ b/tools/remove-object
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-
-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';
 
 use MT;
 my $mt = MT->new or die MT->errstr;
diff --git a/tools/run-periodic-tasks b/tools/run-periodic-tasks
index 7c16bf1..886236f 100755
--- a/tools/run-periodic-tasks
+++ b/tools/run-periodic-tasks
@@ -7,8 +7,7 @@
 # $Id$
 
 use strict;
-
-use lib 'lib', '../lib', 'extlib', '../extlib';
+use lib '/usr/share/movabletype/extlib';
 
 my $daemonize = 0;
 my $sleep     = 5;
diff --git a/tools/sig-validate b/tools/sig-validate
index 910ed6f..caba8d9 100755
--- a/tools/sig-validate
+++ b/tools/sig-validate
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';
 
 use MT::App::Comments;
 
diff --git a/tools/upgrade b/tools/upgrade
index 07e32fc..6b5f31c 100755
--- a/tools/upgrade
+++ b/tools/upgrade
@@ -10,7 +10,7 @@ package MT::Tool::Upgrade;
 use strict;
 use utf8;
 
-use lib  qw( extlib lib );
+use lib '/usr/share/movabletype/extlib';
 use base qw( MT::Tool );
 
 use Carp qw(confess);
diff --git a/mt-xmlrpc.cgi b/mt-xmlrpc.cgi
index 9c2c667..eb4386e 100755
--- a/mt-xmlrpc.cgi
+++ b/mt-xmlrpc.cgi
@@ -7,10 +7,10 @@
 # $Id$
 
 use strict;
+use lib '/usr/share/movabletype/extlib';
 my $MT_DIR;
 
 sub BEGIN {
-    require File::Spec;
     if ( !( $MT_DIR = $ENV{MT_HOME} ) ) {
         if ( $0 =~ m!(.*[/\\])! ) {
             $MT_DIR = $1;
@@ -20,8 +20,6 @@ sub BEGIN {
         }
         $ENV{MT_HOME} = $MT_DIR;
     }
-    unshift @INC, File::Spec->catdir( $MT_DIR, 'lib' );
-    unshift @INC, File::Spec->catdir( $MT_DIR, 'extlib' );
 }
 
 use XMLRPC::Transport::HTTP;