Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Catalyst-Action-REST
perl-Catalyst-Action-REST.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Catalyst-Action-REST.spec of Package perl-Catalyst-Action-REST
# # spec file for package perl-Catalyst-Action-REST # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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/ # Name: perl-Catalyst-Action-REST Version: 1.21 Release: 0 %define cpan_name Catalyst-Action-REST Summary: Automated REST Method Dispatching License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/J/JJ/JJNAPIORK/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Catalyst::Runtime) >= 5.80030 BuildRequires: perl(Class::Inspector) >= 1.13 BuildRequires: perl(JSON::MaybeXS) BuildRequires: perl(LWP::UserAgent) >= 5.00 BuildRequires: perl(MRO::Compat) >= 0.10 BuildRequires: perl(Module::Pluggable::Object) BuildRequires: perl(Moose) >= 1.03 BuildRequires: perl(Params::Validate) >= 0.76 BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::Requires) BuildRequires: perl(URI::Find) BuildRequires: perl(namespace::autoclean) Requires: perl(Catalyst::Runtime) >= 5.80030 Requires: perl(Class::Inspector) >= 1.13 Requires: perl(JSON::MaybeXS) Requires: perl(MRO::Compat) >= 0.10 Requires: perl(Module::Pluggable::Object) Requires: perl(Moose) >= 1.03 Requires: perl(Params::Validate) >= 0.76 Requires: perl(URI::Find) Requires: perl(namespace::autoclean) %{perl_requires} %description This Action handles doing automatic method dispatching for REST requests. It takes a normal Catalyst action, and changes the dispatch to append an underscore and method name. First it will try dispatching to an action with the generated name, and failing that it will try to dispatch to a regular method. For example, in the synopsis above, calling GET on "/foo" would result in the foo_GET method being dispatched. If a method is requested that is not implemented, this action will return a status 405 (Method Not Found). It will populate the "Allow" header with the list of implemented request methods. You can override this behavior by implementing a custom 405 handler like so: sub foo_not_implemented { ... handle not implemented methods ... } If you do not provide an _OPTIONS subroutine, we will automatically respond with a 200 OK. The "Allow" header will be populated with the list of implemented request methods. If you do not provide an _HEAD either, we will auto dispatch to the _GET one in case it exists. It is likely that you really want to look at Catalyst::Controller::REST, which brings this class together with automatic Serialization of requests and responses. When you use this module, it adds the Catalyst::TraitFor::Request::REST role to your request class. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README TODO %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