Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-H
perl-HTTP-Throwable
perl-HTTP-Throwable.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-HTTP-Throwable.spec of Package perl-HTTP-Throwable
# # spec file for package perl-HTTP-Throwable # # Copyright (c) 2023 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 HTTP-Throwable Name: perl-HTTP-Throwable Version: 0.028 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Set of strongly-typed, PSGI-friendly HTTP 1.1 exception libraries URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) >= 6.78 BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(List::Util) >= 1.45 BuildRequires: perl(Module::Runtime) BuildRequires: perl(Moo) >= 1.004003 BuildRequires: perl(Moo::Role) BuildRequires: perl(MooX::StrictConstructor) BuildRequires: perl(Package::Variant) >= 1.002000 BuildRequires: perl(Plack) >= 0.9967 BuildRequires: perl(Plack::Builder) BuildRequires: perl(Plack::Test) BuildRequires: perl(Plack::Util) BuildRequires: perl(StackTrace::Auto) BuildRequires: perl(Sub::Exporter) BuildRequires: perl(Sub::Exporter::Util) BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::Fatal) >= 0.003 BuildRequires: perl(Test::More) >= 0.96 BuildRequires: perl(Throwable) >= 0.102080 BuildRequires: perl(Type::Tiny) BuildRequires: perl(Type::Utils) BuildRequires: perl(Types::Standard) BuildRequires: perl(namespace::clean) Requires: perl(List::Util) >= 1.45 Requires: perl(Module::Runtime) Requires: perl(Moo) >= 1.004003 Requires: perl(Moo::Role) Requires: perl(MooX::StrictConstructor) Requires: perl(Package::Variant) >= 1.002000 Requires: perl(Plack) >= 0.9967 Requires: perl(Plack::Util) Requires: perl(StackTrace::Auto) Requires: perl(Sub::Exporter) Requires: perl(Sub::Exporter::Util) Requires: perl(Throwable) >= 0.102080 Requires: perl(Type::Tiny) Requires: perl(Type::Utils) Requires: perl(Types::Standard) Requires: perl(namespace::clean) %{perl_requires} %description HTTP-Throwable provides a set of strongly-typed, PSGI-friendly exception implementations corresponding to the HTTP error status code (4xx-5xx) as well as the redirection codes (3xx). This particular package (HTTP::Throwable) is the shared role for all the exceptions involved. It's not intended that you use HTTP::Throwable directly, although you can, and instructions for using it correctly are given below. Instead, you probably want to use HTTP::Throwable::Factory, which will assemble exception classes from roles needed to build an exception for your use case. For example, you can throw a redirect: use HTTP::Throwable::Factory qw(http_throw); http_throw(MovedPermanently => { location => '/foo-bar' }); ...or a generic fully user-specified exception... http_throw({ status_code => 512, reason => 'Server on fire', message => "Please try again after heavy rain", }); For a list of pre-defined, known errors, see WELL-KNOWN TYPES below. These types will have the correct status code and reason, and will understand extra status-related arguments like redirect location or authentication realms. For information on using HTTP::Throwable directly, see COMPOSING WITH HTTP::THROWABLE, below. %prep %autosetup -n %{cpan_name}-%{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 README.md %license LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor