-
Notifications
You must be signed in to change notification settings - Fork 0
vredens/CLI-Display
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
NAME CLI::Display - a set of text display helpers, and more, for command line tools. SYNOPSIS use CLI::Display qw/:prints continue_or_abort/; print_g "this is my green: ", $text, "\n"; print_y "highlighting this using yellow color\n"; print_e "a multi "; print_y "color "; print_g "line"; print "...\n"; # wait for user to continue or abort the script and indent # all output by 1 tab continue_or_abort 1; DESCRIPTION A simple lib of methods that help colorize your CLI tool output using the Term::ANSIColor lib. More helpers are introduced as I need more for my CLI tools. FUNCTIONS print_g (@) Works just like regular 'print' but it colors the output as green. print_y (@) Same as print_g but uses yellow. print_r (@) Same as print_g but uses red. continue_or_abort (@) Halts the script waiting for user input, which needs to be either 'y' or 'n'. SEE ALSO Term::ANSIColor::Print a much better alternative if you want something more complex in generating output. It's OO though. AUTHOR J.B. Ribeiro, <[email protected]> COPYRIGHT AND LICENSE Copyright (C) 2012 by J.B. Ribeiro This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.
About
A set of helper functions for developing command line tools.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published