NAME

Datahub::Factory::Flash - Pretty verbose flash messages

DESCRIPTION

Output pretty verbose messages on the command line interface.

USAGE

The verbose flag is a boolean used to enables or disable the output fo messages. Messages will be outputed by default to STDOUT. This module currently supports three types of messages info, error and success. The ouput is styled using Term::ANSIColor.

This package is a Moo::Role.

For example, consider this module:

package Datahub::Factory::Foo;

use Moo;
with 'Datahub::Factory::Flash';

sub messaging {
    $self->{verbose} = 1;

    $self->info("An info message");
    $self->error("An error message");
    $self->success("A success message");
}

AUTHORS

Matthias Vandermaesen <matthias.vandermaesen@vlaamsekunstcollectie.be>

COPYRIGHT

Copyright 2016 - PACKED vzw, Vlaamse Kunstcollectie vzw

LICENSE

This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.