# # spec file for package perl-Dancer-Plugin-FlashMessage # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Dancer-Plugin-FlashMessage Name: perl-Dancer-Plugin-FlashMessage Version: 0.314.0 Release: 0 # 0.314 -> normalize -> 0.314.0 %define cpan_version 0.314 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Dancer plugin to display temporary messages, so called "flash messages" URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DA/DAMS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Dancer) >= 1.300.100 BuildRequires: perl(Dancer::Plugin) BuildRequires: perl(Dancer::Test) BuildRequires: perl(Module::Build) >= 0.3601 Requires: perl(Dancer) >= 1.300.100 Requires: perl(Dancer::Plugin) Provides: perl(Dancer::Plugin::FlashMessage) = %{version} %undefine __perllib_provides %{perl_requires} %description This plugin helps you display temporary messages, so called "flash messages". It provides a 'flash()' method to define the message. The plugin then takes care of attaching the content to the session, propagating it to the templating system, and then removing it from the session. However, it's up to you to have a place in your views or layout where the message will be displayed. But that's not too hard (see SYNOPSYS). Basically, the plugin gives you access to the 'flash' hash in your views. It can be used to display flash messages. By default, the plugin works using a decent configuration. However, you can change the behaviour of the plugin. See CONFIGURATION %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Build.PL --installdirs=vendor ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog