File perl-MooseX-Role-Parameterized.spec of Package perl-MooseX-Role-Parameterized
#
# spec file for package perl-MooseX-Role-Parameterized
#
# Copyright (c) 2012 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-MooseX-Role-Parameterized
Version: 1.00
Release: 0
%define cpan_name MooseX-Role-Parameterized
Summary: Roles with composition parameters
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/MooseX-Role-Parameterized/
Source: http://www.cpan.org/authors/id/S/SA/SARTAK/%{cpan_name}-%{version}.tar.gz
Patch1: perl-MooseX-Role-Parameterized-old_Test_More.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Moose) >= 2.0300
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::Moose)
BuildRequires: perl(Test::More) >= 0.96
#BuildRequires: perl(Bar)
#BuildRequires: perl(Foo)
#BuildRequires: perl(Foo::Role)
#BuildRequires: perl(inc::Module::Install)
#BuildRequires: perl(JSON)
#BuildRequires: perl(LWP::Simple)
#BuildRequires: perl(Module::Build)
#BuildRequires: perl(Module::Install::AutoManifest)
#BuildRequires: perl(Module::Install::Base)
#BuildRequires: perl(Module::Install::GithubMeta)
#BuildRequires: perl(Module::Install::ManifestSkip)
#BuildRequires: perl(Moose::Exporter)
#BuildRequires: perl(Moose::Meta::Role)
#BuildRequires: perl(Moose::Role)
#BuildRequires: perl(Moose::Util::TypeConstraints)
#BuildRequires: perl(MooseX::Role::Parameterized)
#BuildRequires: perl(MooseX::Role::Parameterized::Meta::Role::Parameterizable)
#BuildRequires: perl(MooseX::Role::Parameterized::Meta::Role::Parameterized)
#BuildRequires: perl(MooseX::Role::Parameterized::Meta::Trait::Parameterized)
#BuildRequires: perl(MooseX::Role::Parameterized::Parameters)
#BuildRequires: perl(MyCompositeRoleA)
#BuildRequires: perl(MyItem::Role::Equippable)
#BuildRequires: perl(MyItem::Role::Wearable)
#BuildRequires: perl(MyPRole)
#BuildRequires: perl(MyRole)
#BuildRequires: perl(MyRole::Delegator)
#BuildRequires: perl(MyRole::LogMethod)
#BuildRequires: perl(MyRole::Parameterized)
#BuildRequires: perl(MyRole::Sans::Block)
#BuildRequires: perl(MyRole::Storage)
#BuildRequires: perl(MyTrait)
#BuildRequires: perl(OtherRole)
#BuildRequires: perl(Parse::CPAN::Meta)
#BuildRequires: perl(P::Role)
#BuildRequires: perl(Test::Consumer)
#BuildRequires: perl(YAML::Tiny)
Requires: perl(Moose) >= 2.0300
%{perl_requires}
%description
Your parameterized role consists of two new things: parameter declarations
and a 'role' block.
Parameters are declared using the the /parameter manpage keyword which very
much resembles the Moose/has manpage. You can use any option that the
Moose/has manpage accepts. The default value for the 'is' option is 'ro' as
that's a very common case. Use 'is => 'bare'' if you want no accessor.
These parameters will get their values when the consuming class (or role)
uses the Moose/with manpage. A parameter object will be constructed with
these values, and passed to the 'role' block.
The 'role' block then uses the usual the Moose::Role manpage keywords to
build up a role. You can shift off the parameter object to inspect what the
consuming class provided as parameters. You use the parameters to customize
your role however you wish.
There are many possible implementations for parameterized roles (hopefully
with a consistent enough API); I believe this to be the easiest and most
flexible design. Coincidentally, Pugs originally had an eerily similar
design.
See the MooseX::Role::Parameterized::Extending manpage for some tips on how
to extend this module.
%prep
%setup -q -n %{cpan_name}-%{version}
%if 0%{?suse_version} <= 1120
%patch1 -p1
sed -i "s|__vendorperl__|%{perl_vendorlib}|g" Makefile.PL t/*.t
%endif
%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
%changelog