Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Perl-Critic CPAN distribution.

Report information
The Basics
Id: 94396
Status: open
Priority: 0/
Queue: Test-Perl-Critic

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.02
Fixed in: (no value)



Subject: colour options in rcfile ignored

For some reason I haven't been able to work out, the colours specified in the RC file don't make it to the test output.

This may be "by design", but I can't tell where.

It would be nice to have a way to enable colours.

Though there's not many ways to know if a target wants colours or not without magic.

You could use Term::ANSIColor which has a way to opt-out  , or you could perhaps sniff HARNESS_OPTS="" for "c" being specified and enable colours if that is present.

But this very much does give me Colors and Test::More does not try to suppress them:

 perl -MTest::More -E'diag(qq{\e[34mhello\e[0m}); pass(q[fake]); done_testing;'

Show quoted text
> For some reason I haven't been able to work out, the colours specified in the RC file don't make it to the test output.
At the moment, colourization is handled by a private _colorize_by_severity() function inside Perl::Critic::Command, so Perl::Critic::Test doesn't have any access to that logic. We certainly could refactor this so everyone can get juicy colors.