]> git.pld-linux.org Git - packages/perl-MooX-late.git/blame - perl-MooX-late.spec
- initial
[packages/perl-MooX-late.git] / perl-MooX-late.spec
CommitLineData
1d40ba95
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir MooX
6%define pnam late
7%include /usr/lib/rpm/macros.perl
8Summary: MooX::late - easily translate Moose code to Moo
9Name: perl-MooX-late
10Version: 0.015
11Release: 1
12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/MooX/%{pdir}-%{pnam}-%{version}.tar.gz
16# Source0-md5: 2807107636e4a40903f1e2caff5fe529
17URL: http://search.cpan.org/dist/MooX-late/
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20%if %{with tests}
21BuildRequires: perl(Type::Utils) >= 1.000001
22BuildRequires: perl-Moo >= 1.006000
23BuildRequires: perl-Test-Fatal >= 0.010
24BuildRequires: perl-Test-Requires >= 0.06
25%endif
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Moo is a light-weight object oriented programming framework which aims
31to be compatible with Moose. It does this by detecting when Moose has
32been loaded, and automatically "inflating" its classes and roles to
33full Moose classes and roles. This way, Moo classes can consume Moose
34roles, Moose classes can extend Moo classes, and so forth.
35
36However, the surface syntax of Moo differs somewhat from Moose. For
37example the isa option when defining attributes in Moose must be
38either a string or a blessed Moose::Meta::TypeConstraint object; but
39in Moo must be a coderef. These differences in surface syntax make
40porting code from Moose to Moo potentially tricky. MooX::late provides
41some assistance by enabling a slightly more Moosey surface syntax.
42
43MooX::late does the following:
44
45Five features. It is not the aim of MooX::late to make every aspect of
46Moo behave exactly identically to Moose. It's just going after the
47low-hanging fruit. So it does five things right now, and I promise
48that future versions will never do more than seven.
49
50Previous releases of MooX::late added support for coerce => 1 and
51default => $nonref. These features have now been added to Moo itself,
52so MooX::late no longer has to deal with them.
53
54%prep
55%setup -q -n %{pdir}-%{pnam}-%{version}
56
57%build
58%{__perl} Makefile.PL \
59 INSTALLDIRS=vendor
60%{__make}
61
62%{?with_tests:%{__make} test}
63
64%install
65rm -rf $RPM_BUILD_ROOT
66
67%{__make} pure_install \
68 DESTDIR=$RPM_BUILD_ROOT
69
70install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%files
77%defattr(644,root,root,755)
78%doc Changes CREDITS INSTALL README TODO
79%{perl_vendorlib}/MooX/*.pm
80%{_mandir}/man3/*
81%{_examplesdir}/%{name}-%{version}
This page took 0.093362 seconds and 4 git commands to generate.