]> git.pld-linux.org Git - packages/perl-MooX-TypeTiny.git/blob - perl-MooX-TypeTiny.spec
- release 2 (by relup.sh)
[packages/perl-MooX-TypeTiny.git] / perl-MooX-TypeTiny.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    MooX
6 %define         pnam    TypeTiny
7 Summary:        MooX::TypeTiny - Optimized type checks for Moo + Type::Tiny
8 Name:           perl-MooX-TypeTiny
9 Version:        0.002003
10 Release:        2
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
19 %if %{with tests}
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
24 %endif
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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.
32
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.
35
36 With this module, setters with type checks should be as fast as an equivalent
37 check in Moose.
38
39 It is hoped that eventually this type inlining will be done automatically,
40 making this module unnecessary.
41
42 %prep
43 %setup -q -n %{pdir}-%{pnam}-%{version}
44
45 %build
46 %{__perl} Makefile.PL \
47         INSTALLDIRS=vendor
48 %{__make}
49
50 %{?with_tests:%{__make} test}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54
55 %{__make} pure_install \
56         DESTDIR=$RPM_BUILD_ROOT
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc Changes README
64 %{perl_vendorlib}/MooX/TypeTiny.pm
65 %{perl_vendorlib}/MooX/TypeTiny
66 %{_mandir}/man3/MooX::TypeTiny.3*
This page took 0.044708 seconds and 4 git commands to generate.