3 %bcond_without tests # do not perform "make test"
7 %include /usr/lib/rpm/macros.perl
8 Summary: MooX::late - easily translate Moose code to Moo
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/MooX/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 2807107636e4a40903f1e2caff5fe529
17 URL: http://search.cpan.org/dist/MooX-late/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl(Type::Utils) >= 1.000001
22 BuildRequires: perl-Moo >= 1.006000
23 BuildRequires: perl-Test-Fatal >= 0.010
24 BuildRequires: perl-Test-Requires >= 0.06
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Moo is a light-weight object oriented programming framework which aims
31 to be compatible with Moose. It does this by detecting when Moose has
32 been loaded, and automatically "inflating" its classes and roles to
33 full Moose classes and roles. This way, Moo classes can consume Moose
34 roles, Moose classes can extend Moo classes, and so forth.
36 However, the surface syntax of Moo differs somewhat from Moose. For
37 example the isa option when defining attributes in Moose must be
38 either a string or a blessed Moose::Meta::TypeConstraint object; but
39 in Moo must be a coderef. These differences in surface syntax make
40 porting code from Moose to Moo potentially tricky. MooX::late provides
41 some assistance by enabling a slightly more Moosey surface syntax.
43 MooX::late does the following:
45 Five features. It is not the aim of MooX::late to make every aspect of
46 Moo behave exactly identically to Moose. It's just going after the
47 low-hanging fruit. So it does five things right now, and I promise
48 that future versions will never do more than seven.
50 Previous releases of MooX::late added support for coerce => 1 and
51 default => $nonref. These features have now been added to Moo itself,
52 so MooX::late no longer has to deal with them.
55 %setup -q -n %{pdir}-%{pnam}-%{version}
58 %{__perl} Makefile.PL \
62 %{?with_tests:%{__make} test}
65 rm -rf $RPM_BUILD_ROOT
67 %{__make} pure_install \
68 DESTDIR=$RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
78 %doc Changes CREDITS INSTALL README TODO
79 %{perl_vendorlib}/MooX/*.pm
81 %{_examplesdir}/%{name}-%{version}