From 133c767568da3fe9f67d03df4bdf1a7e25b91d52 Mon Sep 17 00:00:00 2001 From: Timofey Potapov Date: Fri, 24 May 2024 00:25:08 +0200 Subject: [PATCH] 1.14 - dded dye functions for coloring. --- README.md | 6 ++++++ lib/e.pm | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0a87ba..a4ac786 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,12 @@ Data dumper. Internal data dumper. +## dye + +Color a string. + + say dye( "HEY", "RED" ); + ## g Perform a get request. diff --git a/lib/e.pm b/lib/e.pm index 6493419..aa315af 100644 --- a/lib/e.pm +++ b/lib/e.pm @@ -34,7 +34,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '1.13'; +our $VERSION = '1.14'; =head1 SYNOPSIS @@ -193,6 +193,12 @@ Data dumper. Internal data dumper. +=head2 dye + +Color a string. + + say dye( "HEY", "RED" ); + =head2 g Perform a get request. @@ -368,6 +374,12 @@ sub import { Devel::Peek::Dump( @_ ); }, + # Color. + dye => sub { + require Term::ANSIColor; + Term::ANSIColor::colored( @_ ); + }, + ###################################### # Web Related ######################################