From 2d3c835b5cfa72d489377be812e1918dd44f807f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 27 Jun 2013 00:38:10 -0400 Subject: support color on windows (aero) --- Changes | 1 + dist.ini | 5 +++++ lib/Reply/Plugin/Colors.pm | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/Changes b/Changes index d88e21e..98e733f 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Reply {{$NEXT}} + - support color on windows (aero) 0.16 2013-06-26 - bump the Getopt::Long dep, for installing on older perls diff --git a/dist.ini b/dist.ini index 46aa79f..810cec4 100644 --- a/dist.ini +++ b/dist.ini @@ -26,6 +26,7 @@ skip = ^Class::Refresh$ skip = ^Data::Dump$ skip = ^Data::Printer$ skip = ^Proc::InvokeEditor$ +skip = ^Win32::Console::ANSI$ [Prereqs / RuntimeRecommends] App::Nopaste = 0 @@ -34,3 +35,7 @@ Data::Dump = 0 Data::Printer = 0 Proc::InvokeEditor = 0 Term::ReadLine::Gnu = 0 + +; XXX it'd be nice if we could make this recommended instead of required +[OSPrereqs / MSWin32] +Win32::Console::ANSI = 0 diff --git a/lib/Reply/Plugin/Colors.pm b/lib/Reply/Plugin/Colors.pm index 6a7a5e0..aa7e1ef 100644 --- a/lib/Reply/Plugin/Colors.pm +++ b/lib/Reply/Plugin/Colors.pm @@ -6,6 +6,12 @@ use warnings; use base 'Reply::Plugin'; use Term::ANSIColor; +BEGIN { + if ($^O eq 'MSWin32') { + require Win32::Console::ANSI; + Win32::Console::ANSI->import; + } +} =head1 SYNOPSIS -- cgit v1.2.3-54-g00ecf