Gentoo Archives: gentoo-commits

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/perl-overlay:master commit in: scripts/lib/
Date: Sat, 03 Mar 2012 11:58:48
Message-Id: 1330708141.0444b7072aab9ab1b7438bfdf741e1d279175681.kent@gentoo
1 commit: 0444b7072aab9ab1b7438bfdf741e1d279175681
2 Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
3 AuthorDate: Fri Mar 2 17:09:01 2012 +0000
4 Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
5 CommitDate: Fri Mar 2 17:09:01 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=0444b707
7
8 [script/libs] Change Italic encoding to use Term::ANSIColor via a bit of hackery
9
10 ---
11 scripts/lib/coloriterator.pm | 8 +++++++-
12 1 files changed, 7 insertions(+), 1 deletions(-)
13
14 diff --git a/scripts/lib/coloriterator.pm b/scripts/lib/coloriterator.pm
15 index 3709083..3fcce3a 100644
16 --- a/scripts/lib/coloriterator.pm
17 +++ b/scripts/lib/coloriterator.pm
18 @@ -24,7 +24,13 @@ use Sub::Exporter -setup => { exports => [ coloriser => \&build_coloriser ], };
19
20 use Term::ANSIColor qw( :constants );
21
22 -sub ITALIC() { "\e[3m" }
23 +BEGIN {
24 + $Term::ANSIColor::ATTRIBUTES{italic} = 3;
25 +}
26 +
27 +sub ITALIC() {
28 + Term::ANSIColor::ITALIC(@_);
29 +}
30
31 sub build_coloriser {
32 my ( $class, $name, $args ) = @_;