From: Simon Ruderich Date: Mon, 9 Apr 2012 15:20:33 +0000 (+0200) Subject: Don't use Term::ANSIColor in buildd mode. X-Git-Tag: 0.01~29 X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=commitdiff_plain;h=8ee5374c67a1ed7f48a40567e764865ad26a064e Don't use Term::ANSIColor in buildd mode. --- diff --git a/bin/blhc b/bin/blhc index 829d782..10b39f3 100755 --- a/bin/blhc +++ b/bin/blhc @@ -22,7 +22,6 @@ use strict; use warnings; use Getopt::Long (); -use Term::ANSIColor (); use Text::ParseWords (); our $VERSION = '0.01'; @@ -449,6 +448,12 @@ along with this program. If not, see . exit 0; } +# Don't load Term::ANSIColor in buildd mode because Term::ANSIColor is not +# installed on Debian's buildds. +if (not $option_buildd) { + require Term::ANSIColor; +} + if ($option_all) { $option_pie = 1; $option_bindnow = 1; @@ -563,7 +568,7 @@ FILE: foreach my $file (@ARGV) { # Ignore compiler warnings for now. next if $line =~ /$warning_regex/o; - if ($line =~ /\033/) { # esc + if (not $option_buildd and $line =~ /\033/) { # esc # Remove all ANSI color sequences which are sometimes used in # non-verbose builds. $line = Term::ANSIColor::colorstrip($line);