Name: perl-MooseX-Traits Version: 0.07 Release: 1%{?dist} Summary: Automatically apply roles at object creation time License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/MooseX-Traits/ Source0: http://www.cpan.org/authors/id/J/JR/JROCKWAY/MooseX-Traits-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Class::MOP) >= 0.84 BuildRequires: perl(Moose) >= 0.84 BuildRequires: perl(Moose::Role) BuildRequires: perl(namespace::autoclean) BuildRequires: perl(ok) BuildRequires: perl(Sub::Exporter) BuildRequires: perl(Test::Exception) Requires: perl(Class::MOP) >= 0.84 Requires: perl(Moose) >= 0.84 Requires: perl(Moose::Role) Requires: perl(namespace::autoclean) Requires: perl(Sub::Exporter) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description Often you want to create components that can be added to a class arbitrarily. This module makes it easy for the end user to use these components. Instead of requiring the user to create a named class with the desired roles applied, or applying roles to the instance one-by-one, he can just pass a traits parameter to the class's new_with_traits constructor. This role will then apply the roles in one go, cache the resulting class (for efficiency), and return a new instance. Arguments meant to initialize the applied roles' attributes can also be passed to the constructor. %prep %setup -q -n MooseX-Traits-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog * Sun Dec 13 2009 Dave Cross 0.07-1 - Specfile autogenerated by cpanspec 1.77.