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

Please note: I asked "how to disable colorisation", not "how to make it work", or "who enabled it by default", nor did I invite debate as to whether I should want to disable it.

Replies are listed 'Best First'.
Re^2: They've fscked with CPAN.pm again
by syphilis (Archbishop) on Sep 12, 2009 at 01:53 UTC
    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
      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
Re^2: They've fscked with CPAN.pm again
by DrHyde (Prior) on Sep 14, 2009 at 09:47 UTC
    So you want people to help you disable it, without knowing who enabled it or where they did it?

      I asked if anybody knew!. In your case, I think the answer is fairly obviously "no".


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Pardon me for trying to be helpful. I'll try not to do that in future.