Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Catalyst-Controller-ActionRole
perl-Catalyst-Controller-ActionRole.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Catalyst-Controller-ActionRole.spec of Package perl-Catalyst-Controller-ActionRole
# # spec file for package perl-Catalyst-Controller-ActionRole # # Copyright (c) 2015 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 http://bugs.opensuse.org/ # Name: perl-Catalyst-Controller-ActionRole Version: 0.17 Release: 0 %define cpan_name Catalyst-Controller-ActionRole Summary: (DEPRECATED) Apply roles to action instances License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Catalyst-Controller-ActionRole/ Source0: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Catalyst) BuildRequires: perl(Catalyst::Action) BuildRequires: perl(Catalyst::Action::REST) >= 0.74 BuildRequires: perl(Catalyst::Controller) BuildRequires: perl(Catalyst::Runtime) >= 5.80025 BuildRequires: perl(Catalyst::Test) BuildRequires: perl(Catalyst::Utils) BuildRequires: perl(Class::Load) BuildRequires: perl(Module::Build::Tiny) >= 0.039 BuildRequires: perl(Moose) BuildRequires: perl(Moose::Meta::Class) BuildRequires: perl(Moose::Role) BuildRequires: perl(MooseX::Types::Moose) BuildRequires: perl(String::RewritePrefix) >= 0.004 BuildRequires: perl(namespace::autoclean) BuildRequires: perl(namespace::clean) BuildRequires: perl(parent) Requires: perl(Catalyst::Controller) Requires: perl(Catalyst::Runtime) >= 5.80025 Requires: perl(Catalyst::Utils) Requires: perl(Class::Load) Requires: perl(Moose) Requires: perl(Moose::Meta::Class) Requires: perl(MooseX::Types::Moose) Requires: perl(String::RewritePrefix) >= 0.004 Requires: perl(namespace::autoclean) %{perl_requires} %description This module allows one to apply the Moose::Role manpages to the 'Catalyst::Action's for different controller methods. For that a 'Does' attribute is provided. That attribute takes an argument, that determines the role, which is going to be applied. If that argument is prefixed with '+', it is assumed to be the full name of the role. If it's prefixed with '~', the name of your application followed by '::ActionRole::' is prepended. If it isn't prefixed with '+' or '~', the role name will be searched for in '@INC' according to the rules for /ROLE PREFIX SEARCHING. It's possible to apply roles to *all* actions of a controller without specifying the 'Does' keyword in every action definition: package MyApp::Controller::Bar use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller::ActionRole' } __PACKAGE__->config( action_roles => ['Foo', '~Bar'], ); # Has Catalyst::ActionRole::Foo and MyApp::ActionRole::Bar applied. # # If MyApp::ActionRole::Foo exists and is loadable, it will take # precedence over Catalyst::ActionRole::Foo. # # If MyApp::ActionRole::Bar exists and is loadable, it will be loaded, # but even if it doesn't exist Catalyst::ActionRole::Bar will not be loaded. sub moo : Local { ... } Additionally, roles can be applied to selected actions without specifying 'Does' using the Catalyst::Controller/action manpage and configured with the Catalyst::Controller/action_args manpage: package MyApp::Controller::Baz; use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller::ActionRole' } __PACKAGE__->config( action_roles => [qw( Foo )], action => { some_action => { Does => [qw( ~Bar )] }, another_action => { Does => [qw( +MyActionRole::Baz )] }, }, action_args => { another_action => { customarg => 'arg1' }, } ); # has Catalyst::ActionRole::Foo and MyApp::ActionRole::Bar applied sub some_action : Local { ... } # has Catalyst::ActionRole::Foo and MyActionRole::Baz applied # and associated action class would get additional arguments passed sub another_action : Local { ... } %prep %setup -q -n %{cpan_name}-%{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 %defattr(-,root,root,755) %doc Changes CONTRIBUTING LICENSE 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