App-TimeTracker
    
    
  
  
  
view release on metacpan or search on metacpan
lib/App/TimeTracker/Utils.pm view on Meta::CPAN
use Scalar::Util qw(blessed);
use Term::ANSIColor;
use Exporter;
use parent qw(Exporter);
our @EXPORT      = qw();
our @EXPORT_OK   = qw(pretty_date now error_message warning_message);
our %EXPORT_TAGS = ( all => \@EXPORT_OK );
sub error_message {
    _message( 'bold red', @_ );
}
sub warning_message {
    _message( 'bold yellow', @_ );
}
sub _message {
    my ( $color, $message, @params ) = @_;
    my $string = sprintf( $message, @params );
    print color $color;
    print $string;
    say color 'reset';
( run in 1.367 second using v1.01-cache-2.11-cpan-c333fce770f )