Re^3: They've fscked with CPAN.pm again
by syphilis (Archbishop) on Sep 11, 2009 at 03:01 UTC
|
What triggers the behaviour ? I have (I think) the same build of perl as you - namely the x64 build of perl-5.10.1 (build 1006), and I get that annoying behaviour only if I open the cpan shell but no compiler can be found (because I forgot to first run the batch file that will make it visible).
If a compiler is not visible, the shell immediately changes color, and the download of MinGW automatically starts. (I suspect it's the 32-bit MinGW, too, which won't work with this build of perl anyway). I had assumed that ActiveState settings (not CPAN.pm) was responsible for all of this as the behaviour does not arise with perl-5.10.1 built from official perl 5.10.1 source .... but I haven't gone digging for the cause. (There is currently quite a bit of ActiveState-specific stuff built into ActivePerl.)
I certainly don't get any of those ansi escapes you reported, possibly because my $ENV{TERM} is set to dumb, as already suggested by Anonymous Monk. Not sure if that's an option for you, but it may help if you're open to it.
I take it you're running the cmd.exe shell.
Cheers, Rob | [reply] |
|
|
I get that annoying behaviour only if I open the cpan shell but no compiler can be found
Thanks! That is indeed the trigger. If I switch to a session with the compiler configured and the behaviour disappears. Another bloody stupid decision. Now I'll have to start a compiler session even if I just want to check the latest versions of my packages.
And the visible escape sequences happened only after I tried Anonymonk's o conf colorise_output undef.
But the stuff I've posted here doesn't show how bad it really is. I use white background, but they set it black. But not the whole thing, just what they print, so you end up with the mess of nearly invisble red and green text on a ragged-edged black background surrounded by white.
As for the distinction between "ActiveState settings (not CPAN.pm) was responsible", the who doesn't really matter to me, I just wanted turn it off.
$ENV{TERM} is set to dumb, Not sure if that's an option for you, No. I have other software that uses that standard environment variable. Using it to disable this idiocy is not an option.
c
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.
| [reply] [d/l] |
|
|
Apparently it is an experimental feature, yup, idiotic to turn it on by default
| [reply] |
|
|
| [reply] [d/l] |
|
|
|
|
|
|
|
| [reply] |
Re^3: They've fscked with CPAN.pm again
by Your Mother (Archbishop) on Sep 11, 2009 at 00:33 UTC
|
Are you sure it is "opt out?" Or is this specific to a certain platform? I've never had any coloring in my terminal on any number of OS X and Linux flavors on any of the 15 or more versions of CPAN I've used the shell with; on the most recent version now and it's just plain terminal text.
Maybe some package changed the settings on you...? This is what mine shows (I had no idea the settings existed till reading your post)-
colorize_debug undef
colorize_output undef
colorize_print undef
colorize_warn undef
Update: solution-wise, you can probably find and edit your CPAN/MyConfig.pm to remove the settings. | [reply] [d/l] |
|
|
I'd never seen it before either until I recently upgraded to 5.10.1. Nothing else changed--in terms of environment settings etc.
Upto and including 5.10.0 (AS1004), I was also blissfully unaware that there was even an option for this. After the upgrade, not only is everything inside the cpan shell unintellible, once you quit out, everything else is too because they fail to put things back how they were. Its just bad programming.
And it rejects any attempts to achieve your settings:
←[32m
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.←[0m
cpan> o conf /color/
←[32m$CPAN::Config options from ←[0m←[32m'C:\Perl64\
+lib/CPAN/Config.pm'←[0m←[32m:←[0m
←[32m←[0m
←[32m colorize_debug undef←[0m
←[32m colorize_output [undef]←[0m
←[32m colorize_print [green]←[0m
←[32m colorize_warn [red]←[0m
←[32m←[0m
←[32m←[0m
cpan> o conf colorize_debug undef
←[32m colorize_debug [undef]←[0m
←[32mPlease use 'o conf commit' to make the config permanent!
+592;[0m
←[32m←[0m
cpan> o conf colorize_print undef
Term::ANSIColor rejects color[undef]: Invalid attribute name undef at
+C:\Perl64\lib/CPAN/Shell.pm line 1453
Please choose a different color (Hint: try 'o conf init /color/')
colorize_print [undef]←[0m
Term::ANSIColor rejects color[undef]: Invalid attribute name undef at
+C:\Perl64\lib/CPAN/Shell.pm line 1453
Please choose a different color (Hint: try 'o conf init /color/')
Please use 'o conf commit' to make the config permanent!←[0m
Term::ANSIColor rejects color[undef]: Invalid attribute name undef at
+C:\Perl64\lib/CPAN/Shell.pm line 1453
Please choose a different color (Hint: try 'o conf init /color/')
←[0m
Bah humbug! Time to go a hacking again :(
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.
| [reply] [d/l] |
|
|
Does AS1004 mean Activestate? If so, I suspect it's their fault, cos I've not noticed this behaviour on any of the several perls I've built since 5.10.1 came out, on all kinds of different platforms.
Or it's a Windows bug and it's not properly rendering colour codes. Have you loaded ANSI.SYS?
| [reply] |
|
|
|
|
|
|
|
Re^3: They've fscked with CPAN.pm again
by ysth (Canon) on Sep 11, 2009 at 02:05 UTC
|
| [reply] |
|
|
Perhaps you should eschew upgrading.
Were that an option for cpan, I would. But the crap gets delivered with Perl...
Oh! You were being sarcastic.
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.
| [reply] |