Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Win32::Console::ANSI (if available) to support color option under Win32 #101

Merged
merged 2 commits into from Jul 15, 2017

Conversation

charsbar
Copy link
Contributor

re: #98 (comment)
With this module, you can colorize log under Win32.

@charsbar charsbar mentioned this pull request Jul 10, 2017
@@ -35,6 +38,13 @@ sub log {
my $verbose = ref $self ? $self->{verbose} : $VERBOSE;
my $show_progress = ref $self ? $self->{show_progress} : $SHOW_PROGRESS;

if ($is_color and WIN32) {
if (!defined $HAS_WIN32_COLOR) {
$HAS_WIN32_COLOR = eval 'require Win32::Console::ANSI; 1' ? 1 : 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use eval BLOCK instead of eval STRING here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Updated the PR to use eval STRING.

@skaji skaji merged commit ac2d717 into skaji:master Jul 15, 2017
@skaji
Copy link
Owner

skaji commented Jul 15, 2017

@charsbar thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants