3 %bcond_without tests # do not perform "make test"
6 Summary: asa - Lets your class/object say it works like something else
10 License: GPL v1+ or Artistic
11 Group: Development/Languages/Perl
12 Source0: http://www.cpan.org/modules/by-authors/id/E/ET/ETHER/asa-%{version}.tar.gz
13 # Source0-md5: cbe6d1db505eb4eaa2bf35a637fc0451
14 URL: https://metacpan.org/release/asa
15 BuildRequires: perl-devel >= 1:5.8.0
16 BuildRequires: rpm-perlprov >= 4.1-13
17 BuildRequires: rpmbuild(macros) >= 1.745
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Perl 5 doesn't natively support Java-style interfaces, and it doesn't
25 support Perl 6 style roles either.
27 You can get both of these things in half a dozen different ways via
28 various CPAN modules, but they usually require that you buy into
29 "their way" of implementing your code.
31 Other have turned to "duck typing".
33 This is, for the most part, a fairly naive check that says "can you do
34 this method", under the "if it looks like a duck, and quacks like a
35 duck, then it must be a duck".
37 It assumes that if you have a ->quack method, then they will treat you
38 as a duck, because doing things like adding Duck to your @ISA array
39 means you are also forced to take their implementation.
42 %setup -q -n %{pdir}-%{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)
62 %doc Changes INSTALL README
63 %{perl_vendorlib}/asa.pm
64 %{_mandir}/man3/asa.3*