how about a ‘nocolor’ option, for example setting a local variable:
                local $EFS::Deploy::ColoredErrors::nocolor = 1;

this is a more general solution which allows you to disable code coloring in 
any block without changing the subroutines you’re calling. it would also allow 
the creation of a cli flag like ‘--nocolor’ to be created, which would be a 
great addition to both the efs and efsdeploy command line clients.
~jerry

From: [email protected] 
[mailto:[email protected]] On Behalf Of Phillip Moore
Sent: Wednesday, December 05, 2012 9:34 AM
To: [email protected]
Subject: [EFS-commits] [efs-deploy] I love emacs, but it is such a pig 
sometimes.

Message: I love emacs, but it is such a pig sometimes.
I have found that if you generate a LOT of ANSI color escape
sequences, emacs start to bog down, so this tweak gets rid of a lot of
them from the output of a big cpan2efs job.
Commit: df6f26eddff5bc3cacbc133a99e7d745afc98300
Date: Wed Dec 5 11:46:30 2012 -0500
Author: Phillip Moore <[email protected]>
Changed file lib/EFS/Deploy/CPAN/DependencyTree.pm
65

65

     foreach my $name ( @modules ) {

66

66

         my $module = $self->cpan->module( $name );

67

67

         if ( not $module ) {

68

             warn qq{No such CPAN module '$name'\n};


68

             error( qq{No such CPAN module '$name'\n} );

69

69

             $fatal++;

70

70

         }

71

71

         my $distribution = $module->distribution;

72

72

         my ($latest) = $self->cpan->name2distros( $distribution->name );

73

73

         if ( $latest->version eq $distribution->version ) {

74

             warn qq{Module '$name' expands to }, $distribution->distvname, 
qq{\n};


74

             STDERR->print( qq{Module '$name' expands to }, 
$distribution->distvname, qq{\n} );

75

75

             push @distributions, $distribution;

76

76

         } else {

77

77

             warn(

86

86

     foreach my $distro ( @distros ) {

87

87

         my @available = $self->cpan->name2distros( $distro );

88

88

         if ( not @available ) {

89

             warn qq{No such CPAN distro '$distro'\n};


89

             error( qq{No such CPAN distro '$distro'\n} );

90

90

             $fatal++;

91

91

         } else {

92

92

             if ( $#available > 0 ) {

96

96

                     qq{Using the latest version (}, $available[0]->version, 
qq{)\n},

97

97

                 );

98

98

             } else {

99

                 warn( qq{Found $distro version }, $available[0]->version, 
qq{\n} );


99

                 STDERR->print( qq{Found $distro version }, 
$available[0]->version, qq{\n} );

100

100

             }

101

101

             push @distributions, $available[0];

102

102

         }



----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
_______________________________________________
EFS-dev mailing list
[email protected]
http://mailman.openefs.org/mailman/listinfo/efs-dev

Reply via email to