Term::GentooFunctions - provides gentoo's einfo, ewarn, eerror, ebegin and eend.
use Term::GentooFunctions qw(:all)
einfo "this is kinda neat...";
ebegin "I hope this works..."; .... eend $truefalse; # the result is backwards of gentoo; ie, 0 is bad, 1 is good.
einfo, ewarn, and error show informative lines
ebegin and eend show the beginning and ends of things.
Additionally, eend returns the result passed in for handy returns at the bottom of functions...
sub eg { eend 0; # eg now returns a false!! Huzzah! }
Lastly, eend will use $_ if it is not passed any arguments.
you can also use eindent and eoutdent to show trees of things happening:
einfo "something" eindent einfo "something else" # indented eoutdent einfo "something else (again)" # un-dented
BTW, Term::GentooFunctions will use RC_INDENTATION and RC_DEFAULT_INDENT from /sbin/functions.sh... So you can eindent in a bash_script.sh and your perl_script.pl will use the indent level! However, to get it to work you must
export RC_INDENTATION RC_DEFAULT_INDENT before you fork to perl. Also, T::GF won't be able to modify the indent level in a way that will propagate back up to bash (obviously).
Paul Miller <jettero@cpan.org>
I am using this software in my own projects... If you find bugs, please please please let me know. :) Actually, let me know if you find it handy at all. Half the fun of releasing this stuff is knowing that people use it.
Copyright (c) 2007 Paul Miller -- LGPL [attached]
Term::Size, Term::ANSIColor, Term::ANSIScreen