packages: perl-autobox/perl-autobox.spec (NEW) - initial
amateja
amateja at pld-linux.org
Sat Oct 17 16:25:25 CEST 2009
Author: amateja Date: Sat Oct 17 14:25:25 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- initial
---- Files affected:
packages/perl-autobox:
perl-autobox.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/perl-autobox/perl-autobox.spec
diff -u /dev/null packages/perl-autobox/perl-autobox.spec:1.1
--- /dev/null Sat Oct 17 16:25:25 2009
+++ packages/perl-autobox/perl-autobox.spec Sat Oct 17 16:25:20 2009
@@ -0,0 +1,92 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
+%include /usr/lib/rpm/macros.perl
+%define pdir autobox
+Summary: autobox - call methods on native types
+Summary(pl.UTF-8): autobox - wywoływanie metod na rodzimych typach
+Name: perl-autobox
+Version: 2.55
+Release: 1
+# same as perl
+License: GPL v1+ or Artistic
+Group: Development/Languages/Perl
+Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHOCOLATE/autobox-%{version}.tar.gz
+# Source0-md5: d2813439a0da9b048cc1793af05b2144
+URL: http://search.cpan.org/dist/autobox/
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires: perl-Scope-Guard >= 0.03
+%endif
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The autobox pragma allows methods to be called on integers, floats,
+strings, arrays, hashes, and code references in exactly the same
+manner as blessed references.
+
+The autoboxing is transparent: boxed values are not blessed into their
+(user-defined) implementation class (unless the method elects to
+bestow such a blessing) - they simply use its methods as though they
+are.
+
+The classes (packages) into which the native types are boxed are fully
+configurable. By default, a method invoked on a non-object is assumed
+to be defined in a class whose name corresponds to the ref() type of
+that value - or SCALAR if the value is a non-reference.
+
+This mapping can be overriden by passing key/value pairs to the use
+autobox statement, in which the keys represent native types, and the
+values their associated classes.
+
+As with regular objects, autoboxed values are passed as the first
+argument of the specified method. Consequently, given a vanilla use
+autobox:
+
+# %description -l pl.UTF-8
+# TODO
+
+%prep
+%setup -q -n %{pdir}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make} \
+ CC="%{__cc}" \
+ OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorarch}/autobox.pm
+%dir %{perl_vendorarch}/autobox
+%{perl_vendorarch}/autobox/*.pm
+%dir %{perl_vendorarch}/auto/autobox
+%{perl_vendorarch}/auto/autobox//*.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/autobox//*.so
+%{_mandir}/man3/*
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2009/10/17 14:25:20 amateja
+- initial
+
================================================================
More information about the pld-cvs-commit
mailing list