[otrs-cvs] otrs/bin otrs.CheckModules.pl,1.50,1.51

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/bin
In directory lancelot:/tmp/cvs-serv528/bin

Modified Files:
	otrs.CheckModules.pl 
Log Message:
Apparently Win32::Console::ANSI is available on 5.16.x Windows perls, but not on some others. Turn off colors if module is not present on Win32.

Author: mb

Index: otrs.CheckModules.pl
===================================================================
RCS file: /home/cvs/otrs/bin/otrs.CheckModules.pl,v
retrieving revision 1.50
retrieving revision 1.51
diff -2 -u -d -r1.50 -r1.51
--- otrs.CheckModules.pl	22 Jan 2013 10:14:09 -0000	1.50
+++ otrs.CheckModules.pl	1 Feb 2013 13:39:33 -0000	1.51
@@ -31,7 +31,15 @@
 use lib dirname($RealBin) . '/Custom';
 
+# on Windows, we only have ANSI support if Win32::Console::ANSI is present
+# turn off colors if it is not available
+BEGIN {
+    if ( $^O eq 'MSWin32' ) {
+        eval "use Win32::Console::ANSI";
+        $ARGV[0] = 'nocolors' if $@;
+    }
+}
+
 use ExtUtils::MakeMaker;
 use File::Path;
-use if $^O eq 'MSWin32', "Win32::Console::ANSI";
 use Term::ANSIColor;
 
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.