]> git.pld-linux.org Git - packages/perl-autobox.git/blame - perl-autobox.spec
perl 5.38.0 rebuild
[packages/perl-autobox.git] / perl-autobox.spec
CommitLineData
ddbcfdcc 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
ddbcfdcc 5%define pdir autobox
6Summary: autobox - call methods on native types
7Summary(pl.UTF-8): autobox - wywoływanie metod na rodzimych typach
8Name: perl-autobox
cb2c0617 9Version: 2.85
39f47649 10Release: 7
ddbcfdcc 11# same as perl
12License: GPL v1+ or Artistic
13Group: Development/Languages/Perl
14Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHOCOLATE/autobox-%{version}.tar.gz
cb2c0617 15# Source0-md5: 9426e71114884f096f71f2e7002310cf
ddbcfdcc 16URL: http://search.cpan.org/dist/autobox/
17BuildRequires: perl-devel >= 1:5.8.0
18BuildRequires: rpm-perlprov >= 4.1-13
19%if %{with tests}
20BuildRequires: perl-Scope-Guard >= 0.03
21%endif
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25The autobox pragma allows methods to be called on integers, floats,
26strings, arrays, hashes, and code references in exactly the same
27manner as blessed references.
28
29The autoboxing is transparent: boxed values are not blessed into their
30(user-defined) implementation class (unless the method elects to
31bestow such a blessing) - they simply use its methods as though they
32are.
33
34The classes (packages) into which the native types are boxed are fully
35configurable. By default, a method invoked on a non-object is assumed
36to be defined in a class whose name corresponds to the ref() type of
37that value - or SCALAR if the value is a non-reference.
38
39This mapping can be overriden by passing key/value pairs to the use
40autobox statement, in which the keys represent native types, and the
41values their associated classes.
42
43As with regular objects, autoboxed values are passed as the first
44argument of the specified method. Consequently, given a vanilla use
45autobox:
46
47# %description -l pl.UTF-8
48# TODO
49
50%prep
51%setup -q -n %{pdir}-%{version}
52
53%build
54%{__perl} Makefile.PL \
55 INSTALLDIRS=vendor
56%{__make} \
57 CC="%{__cc}" \
58 OPTIMIZE="%{rpmcflags}"
59
60%{?with_tests:%{__make} test}
61
62%install
63rm -rf $RPM_BUILD_ROOT
64
65%{__make} pure_install \
66 DESTDIR=$RPM_BUILD_ROOT
67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
73%doc Changes README
74%{perl_vendorarch}/autobox.pm
75%dir %{perl_vendorarch}/autobox
76%{perl_vendorarch}/autobox/*.pm
77%dir %{perl_vendorarch}/auto/autobox
ddbcfdcc 78%attr(755,root,root) %{perl_vendorarch}/auto/autobox//*.so
79%{_mandir}/man3/*
This page took 0.218068 seconds and 4 git commands to generate.