summaryrefslogtreecommitdiffstats
path: root/contrib/recode.pl
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2016-02-23 22:23:20 +0100
committerDylan Hardison <dylan@mozilla.com>2016-02-23 22:23:20 +0100
commit2c33712dc066463ab9741a009e56d9a5c2ffedf6 (patch)
tree0be4c1368181648d715a35fd077324d3db0e4dc7 /contrib/recode.pl
parenta8adffb5ba7161a9ac491cca98d880577c1ab2fc (diff)
downloadbugzilla-2c33712dc066463ab9741a009e56d9a5c2ffedf6.tar.gz
bugzilla-2c33712dc066463ab9741a009e56d9a5c2ffedf6.tar.xz
Bug 1246528 - Use Makefile.PL and allow Bugzilla use cpanm-compatible local dependencies
r=dkl,a=dylan
Diffstat (limited to 'contrib/recode.pl')
-rwxr-xr-xcontrib/recode.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/recode.pl b/contrib/recode.pl
index e6da47b92..edd9fe423 100755
--- a/contrib/recode.pl
+++ b/contrib/recode.pl
@@ -10,7 +10,7 @@ use 5.10.1;
use strict;
use warnings;
-use lib qw(. lib);
+use lib qw(. lib local/lib/perl5);
use Bugzilla;
use Bugzilla::Constants;
@@ -88,17 +88,18 @@ if (exists $switch{'charset'}) {
}
if ($switch{'guess'}) {
- if (!eval { require Encode::Detect::Detector }) {
+ if (!Bugzilla->has_feature('detect_charset')) {
my $root = ROOT_USER;
print STDERR <<EOT;
Using --guess requires that Encode::Detect be installed. To install
Encode::Detect, run the following command:
- $^X install-module.pl Encode::Detect
+ cpanm --installdeps --with-feature=detect_charset -l local .
EOT
exit;
}
+ require Encode::Detect;
}
my %overrides;