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-Moo >= 2.004
21 BuildRequires: perl-Type-Tiny >= 1.008
22 BuildRequires: perl-Test-Fatal >= 0.003
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 This module optimizes Moo type checks when used with Type::Tiny to perform
29 better. It will automatically apply to isa checks and coercions that use
30 Type::Tiny. Non-Type::Tiny isa checks will work as normal.
32 This is done by inlining the type check in a more optimal manner that is
33 specific to Type::Tiny rather than the general mechanism Moo usually uses.
35 With this module, setters with type checks should be as fast as an equivalent
38 It is hoped that eventually this type inlining will be done automatically,
39 making this module unnecessary.
42 %setup -q -n %{pdir}-%{pnam}-%{version}
45 %{__perl} Makefile.PL \
49 %{?with_tests:%{__make} test}
52 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55 DESTDIR=$RPM_BUILD_ROOT
58 rm -rf $RPM_BUILD_ROOT
61 %defattr(644,root,root,755)
63 %{perl_vendorlib}/MooX/TypeTiny.pm
64 %{perl_vendorlib}/MooX/TypeTiny
65 %{_mandir}/man3/MooX::TypeTiny.3*