3 %bcond_without tests # do not perform "make test"
7 Summary: MooX::TypeTiny - Optimized type checks for Moo + Type::Tiny
8 Name: perl-MooX-TypeTiny
11 License: GPL v1+ or Artistic
12 Group: Development/Languages/Perl
13 Source0: http://www.cpan.org/modules/by-module/MooX/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5: 11d27986dff550f2e2cdb9d3a6c26469
15 URL: https://metacpan.org/release/MooX-TypeTiny
16 BuildRequires: perl-devel >= 1:5.8.0
17 BuildRequires: rpm-perlprov >= 4.1-13
18 BuildRequires: rpmbuild(macros) >= 1.745
20 BuildRequires: perl-Class-Method-Modifiers
21 BuildRequires: perl-Moo >= 2.004
22 BuildRequires: perl-Type-Tiny >= 1.010002
23 BuildRequires: perl-Test-Fatal >= 0.003
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This module optimizes Moo type checks when used with Type::Tiny to perform
30 better. It will automatically apply to isa checks and coercions that use
31 Type::Tiny. Non-Type::Tiny isa checks will work as normal.
33 This is done by inlining the type check in a more optimal manner that is
34 specific to Type::Tiny rather than the general mechanism Moo usually uses.
36 With this module, setters with type checks should be as fast as an equivalent
39 It is hoped that eventually this type inlining will be done automatically,
40 making this module unnecessary.
43 %setup -q -n %{pdir}-%{pnam}-%{version}
46 %{__perl} Makefile.PL \
50 %{?with_tests:%{__make} test}
53 rm -rf $RPM_BUILD_ROOT
55 %{__make} pure_install \
56 DESTDIR=$RPM_BUILD_ROOT
59 rm -rf $RPM_BUILD_ROOT
62 %defattr(644,root,root,755)
64 %{perl_vendorlib}/MooX/TypeTiny.pm
65 %{perl_vendorlib}/MooX/TypeTiny
66 %{_mandir}/man3/MooX::TypeTiny.3*