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