Dancer2-Plugin-FlashNote

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    auto
        this auto-selects the best option, i.e. it puts the single argument
        as-is if there is only one, otherwise generates an anonymous array
        with all of them. In the template you get:

           flash => [
              'whatever',
              [ 'hey', 'you!' ],
           ]

    array
        this always set the array mode, i.e. you get an array also when
        there is only one parameter. This is probably your best choice if
        you plan to use multiple parameters, because you always get the same
        structure in the template:

           flash => [
              [ 'whatever' ],
              [ 'hey', 'you!' ],
           ]

    The default handling style is *auto*.

  Dequeueing Styles
    When you put a message in the queue, it is kept in the User's session
    until it is eventually dequeued. You can control how the message is
    deleted from the session with the "dequeue" parameter, with the
    following possibilities:

    never
        items are never deleted automatically, but they will be flushed in
        the code by calling "flash_flush()";

    always
        items are always deleted from the session within the same call.
        Technically speaking, using the session in this case is a bit
        overkill, because the session is only used as a mean to pass data
        from the code to the template;

    when_used
        items are all deleted when any of them is used in some way from the
        template. The underlying semantics here is that if you get the
        chance to show a flash message in the template, you can show them
        all so they are removed from the session. If for some reason you
        don't get this chance (e.g. because you are returning a redirection,
        and the template rendering will happen in the next call) the
        messages are kept in the session so that you can display them at the
        next call that actually makes use of a template;

    by_key
        this style only applies if the queueing style is either "key_single"
        or "key_multiple". It is an extension of the "when_used" case, but
        only used keys are deleted and the unused ones are kept in the
        session for usage at some later call.

    The default dequeuing style is *when_used*.

DEPENDENCIES
    Dancer2

BUGS AND LIMITATIONS
    Curious about active bugs or want to report one? The bug tracking system
    can be found at
    <https://rt.cpan.org/Public/Dist/Display.html?Name=Dancer2-Plugin-FlashN
    ote>.

SEE ALSO
    If you want to contribute, check this module out in GitHub at
    <https://github.com/smith153/Dancer2-Plugin-FlashNote>.

    This module is a conversion from the original Dancer::Plugin::FlashNote
    by Flavio Poletti If you find a bug in Dancer2::Plugin::FlashNote, it
    may very likely be in Dancer::Plugin::FlashNote as well.

AUTHOR
    Samuel Smith <esaym@cpan.org>

COPYRIGHT AND LICENSE
    Copyright (C) 2017 by Samuel Smith esaym@cpan.org.

    This module is free software. You can redistribute it and/or modify it
    under the terms of the Artistic License 2.0.

    This program is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of
    merchantability or fitness for a particular purpose.



( run in 1.485 second using v1.01-cache-2.11-cpan-39bf76dae61 )