in reply to Re: They've fscked with CPAN.pm again
in thread They've fscked with CPAN.pm again

I asked "how to disable colorisation", not "how to make it work", or "who enabled it by default"

In this particular instance, I think the solution lies (in part, at least) in altering sub _warn in lib/ActivePerl/Config.pm.

At the beginning of that sub we have:
unless (-t STDOUT) { print "\n$msg\n"; return; }
Changing the (-t STDOUT) to (0) takes care of things nicely for me. (There's no doubt a less hamfisted approach that would also work.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: They've fscked with CPAN.pm again (patch)
by syphilis (Archbishop) on Sep 13, 2009 at 08:01 UTC
    There's no doubt a less hamfisted approach that would also work

    For example, this patch to lib/ActivePerl/Config.pm:
    --- Config.pm_orig Sun Sep 13 17:44:03 2009 +++ Config.pm Sun Sep 13 17:49:34 2009 @@ -304,6 +304,7 @@ unless ($console) { $console = Win32::Console->new(Win32::Console::STD_OUTPUT_HAND +LE()); } + my $current = $console->Attr(); my($col,undef) = $console->Size; print "\n"; $console->Attr($Win32::Console::FG_RED | $Win32::Console::BG_WHIT +E); @@ -311,7 +312,7 @@ $_ .= " " while length() < $col-1; print "$_\n"; } - $console->Attr($Win32::Console::ATTR_NORMAL); + $console->Attr($current); print "\n"; }
    Cheers,
    Rob