GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BADGER::RAINBOW (3)

.ds Aq ’

NAME

Badger::Rainbow - colour functionality

CONTENTS

SYNOPSIS



    use Badger::Rainbow ANSI => red green blue;
   
    print red("This is red");
    print green("This is green");
    print blue("This is blue");



DESCRIPTION

This module implements colour-related functionality. It is currently only used for debugging purposes but may be extended in the future.

EXPORTABLE ITEMS

ANSI_escape($code, CW$line1, CW$line2, ...)

This function applies an ANSI escape code to each line of text, with the effect of colouring output on compatible terminals.



    use Badger::Rainbow ANSI_escape;
    print ANSI_escape(31, Hello World);     # 31 is red



    strip_ANSI_escapes($text)

This function removes any ANSI escapes from the text passed as an argument.

    ANSI

This is an export hook which allows you to import subroutines which apply the correct ANSI escape codes to render text in colour on compatible terminals.



    use Badger::Rainbox ANSI => red green blue;
   
    print red("This is red");
    print green("This is green");
    print blue("This is blue");



Available colours are: black, red, green, yellow, blue, magenta, cyan and white. The bold and dark styles can also be specified.



    use Badger::Rainbox ANSI => dark bold red green blue;
   
    print bold red "Hello World\n";
    print dark blue "Hello Badger\n";



Colours and styles can be specified as a single whitespace-delimited string or as a reference to a list of individual items.



    use Badger::Rainbox ANSI => red green blue;
    use Badger::Rainbox ANSI => [red, green, blue];



AUTHOR

Andy Wardley <http://wardley.org/>

COPYRIGHT

Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 BADGER::RAINBOW (3) 2010-02-20

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.