On Sun Apr 05 22:43:50 2009, rra@stanford.edu wrote:
Show quoted text> "Roy Ivy III via RT" <bug-ANSIColor@rt.cpan.org> writes:
>
> > I be pleased if you'd consider adding use of the ANSI emulator module
> > 'Win::Color::ANSI' if it's installed so that I don't have to include it
> > manually. I'm a bit tired of writing aliases to load the module when I
> > want color for my cmd or tcc shell (such as 'alias cpan=perl
> > -MWin32::Color::ANSI -MCPAN -e shell').
>
> Could you explain what this module is, what it's for, and how
> Term::ANSIColor would use it?
On Sun Apr 05 22:43:50 2009, rra@stanford.edu wrote:
Show quoted text> "Roy Ivy III via RT" <bug-ANSIColor@rt.cpan.org> writes:
>
> > I be pleased if you'd consider adding use of the ANSI emulator module
> > 'Win::Color::ANSI' if it's installed so that I don't have to include it
> > manually. I'm a bit tired of writing aliases to load the module when I
> > want color for my cmd or tcc shell (such as 'alias cpan=perl
> > -MWin32::Color::ANSI -MCPAN -e shell').
>
> Could you explain what this module is, what it's for, and how
> Term::ANSIColor would use it?
Sorry, late night and I mistyped it... it's actually Win32::Console::ANSI.
Win32::Console::ANSI is an ANSI emulator [see homepage @
http://www.bribes.org/perl/wANSIConsole.html ; CPAN Module page @
http://search.cpan.org/~JLMOREL/Win32-Console-ANSI/lib/Win32/Console/ANSI.pm
].
Since the recent command shells (cmd.exe and alternate shells like tcc)
for Windows don't have an ANSI driver available, I'm using this to
provide the color driver support for your widely used Term::ANSIColor
module. It only needs a module load to provide the emulator support.
Currently, I'm using "set PERL5OPT=-MWin32::Console::ANSI" to load the
driver, but I'd like to remove the weight from all my other modules
which don't have/need color support. Aliases (eg, "doskey cpan=perl
-MWin32::Console::ANSI -MCPAN -e shell $*") also work but are kludgy not
easily applied to all scripts. I was thinking maybe using an %ENV{}
variable like TERM_ANSICOLOR_ANSIEMULATOR (eg, "set
TERM_ANSICOLOR_ANSIEMULATOR=Win32::Console::ANSI". Then, your module
would load the ANSI emulator module when use'd if it's available (or
warning if not available).
Thanks for the response.
- Roy