]> git.pld-linux.org Git - packages/perl-MooX-TypeTiny.git/blob - perl-MooX-TypeTiny.spec
- initial
[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:        1
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-Moo >= 2.004
21 BuildRequires:  perl-Type-Tiny >= 1.008
22 BuildRequires:  perl-Test-Fatal >= 0.003
23 %endif
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
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.
31
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.
34
35 With this module, setters with type checks should be as fast as an equivalent
36 check in Moose.
37
38 It is hoped that eventually this type inlining will be done automatically,
39 making this module unnecessary.
40
41 %prep
42 %setup -q -n %{pdir}-%{pnam}-%{version}
43
44 %build
45 %{__perl} Makefile.PL \
46         INSTALLDIRS=vendor
47 %{__make}
48
49 %{?with_tests:%{__make} test}
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53
54 %{__make} pure_install \
55         DESTDIR=$RPM_BUILD_ROOT
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 %defattr(644,root,root,755)
62 %doc Changes README
63 %{perl_vendorlib}/MooX/TypeTiny.pm
64 %{perl_vendorlib}/MooX/TypeTiny
65 %{_mandir}/man3/MooX::TypeTiny.3*
This page took 0.163043 seconds and 3 git commands to generate.