Dancer2::Plugin::LogReport::Message(3)

NAME
Dancer2::Plugin::LogReport::Message - extended Log::Report message class

INHERITANCE
 Dancer2::Plugin::LogReport::Message
   is a Log::Report::Message

SYNOPSIS
  In your template:

  [% FOR message IN messages %]
    <div class="alert alert-[% message.bootstrap_color %]">
      [% message.toString | html_entity %]
    </div>
  [% END %]

DESCRIPTION
[This Dancer2 plugin was contributed by Andrew Beverley]

This class is an extension of Log::Report::Message, with functions specifically designed for Dancer applications. Minimal functions are provided (currently only aimed at Bootstrap), but ideas for new ones are welcome.

Extends "DESCRIPTION" in Log::Report::Message.

OVERLOADED
Extends "OVERLOADED" in Log::Report::Message.

overload: "" stringification
    Inherited, see "OVERLOADED" in Log::Report::Message

overload: &() function
    Inherited, see "OVERLOADED" in Log::Report::Message

overload: . concatenation
    Inherited, see "OVERLOADED" in Log::Report::Message

METHODS
Extends "METHODS" in Log::Report::Message.

$obj->bootstrap_color()
    Get a suitable bootstrap context color for the message. This can be used as per the SYNOPSIS.

    "success" is used for Dancer2::Plugin::LogReport::success() messages, "info" colors are used for messages "notice" and below, "warning" is used for "warning" and "mistake", "danger" is used for all other messages

$obj->reason()
    Get or set the reason of a message

DETAILS
Extends "DETAILS" in Log::Report::Message.

SEE ALSO
This module is part of Log-Report version 1.41, built on September 11, 2025. Website: http://perl.overmeer.net/CPAN/

LICENSE
For contributors see file ChangeLog.

This software is copyright (c) 2007-2025 by Mark Overmeer.

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