Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-CGI-Application-Plugin-AutoRunmode
perl-CGI-Application-Plugin-AutoRunmode.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-CGI-Application-Plugin-AutoRunmode.spec of Package perl-CGI-Application-Plugin-AutoRunmode
# # spec file for package perl-CGI-Application-Plugin-AutoRunmode (Version 0.18) # # Copyright (c) 2011 SUSE LINUX Products 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 http://bugs.opensuse.org/ # Name: perl-CGI-Application-Plugin-AutoRunmode Version: 0.18 Release: 1 License: GPL+ or Artistic %define cpan_name CGI-Application-Plugin-AutoRunmode Summary: CGI::App plugin to automatically register runmodes Url: http://search.cpan.org/dist/CGI-Application-Plugin-AutoRunmode/ Group: Development/Libraries/Perl Source: http://www.cpan.org/authors/id/T/TH/THILO/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(CGI::Application) >= 3 Requires: perl(CGI::Application) >= 3 %{perl_requires} %description This plugin for CGI::Application provides easy ways to setup run modes. You can just write the method that implement a run mode, you do not have to explicitly register it with CGI::App anymore. There are two approaches: * Declare run modes with subroutine attributes. You can flag methods in your CGI::App subclass with the attribute "Runmode" or "StartRunmode" (these attributes are case-insensitive) * Declare that every method in a class is a run mode. You can assign a delegate object, all whose methods will become runmodes You can also mix both approaches. Delegate runmodes receive two parameters: The first one is the CGI::App instance, followed by the delegate instance or class name. This can be useful if you have delegate objects that contain state. It is possible to chain multiple delegates by specifying an array reference containing the delegate instances or class names. This chain is checked from left to right and the runmode will be delegated to the first match. It both cases, the resulting runmodes will have the same name as the subroutine that implements them. They are activated by a cgiapp_prerun hook provided by this plugin (if you are using CGI::Application older than version 4, hooks are not available, and you can import a cgiapp_prerun method instead). %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 %clean %{__rm} -rf %{buildroot} %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %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