File perl-CGI-Application-Plugin-Session.spec of Package perl-CGI-Application-Plugin-Session

#
# spec file for package perl-CGI-Application-Plugin-Session
#
# 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 CGI-Application-Plugin-Session
Name:           perl-CGI-Application-Plugin-Session
Version:        1.60.0
Release:        0
# 1.06 -> normalize -> 1.60.0
%define cpan_version 1.06
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Plugin that adds session support to CGI::Application
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/W/WE/WESM/%{cpan_name}-%{cpan_version}.tar.gz
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(CGI::Application) >= 3.21
BuildRequires:  perl(CGI::Session) >= 4.48
BuildRequires:  perl(Test::More) >= 1.001002
Requires:       perl(CGI::Application) >= 3.21
Requires:       perl(CGI::Session) >= 4.48
Provides:       perl(CGI::Application::Plugin::Session) = %{version}
%undefine       __perllib_provides
%{perl_requires}

%description
CGI::Application::Plugin::Session seamlessly adds session support to your
CGI::Application modules by providing a CGI::Session object that is
accessible from anywhere in the application.

Lazy loading is used to prevent expensive file system or database calls
from being made if the session is not needed during this request. In other
words, the Session object is not created until it is actually needed. Also,
the Session object will act as a singleton by always returning the same
Session object for the duration of the request.

This module aims to be as simple and non obtrusive as possible. By not
requiring any changes to the inheritance tree of your modules, it can be
easily added to existing applications. Think of it as a plugin module that
adds a couple of new methods directly into the CGI::Application namespace
simply by loading the module.

%prep
%autosetup  -n %{cpan_name}-%{cpan_version}

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%check
make test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%doc Changes README
%license LICENSE

%changelog
openSUSE Build Service is sponsored by