packages: perl-SUPER/perl-SUPER.spec (NEW) - initial

amateja amateja at pld-linux.org
Fri Aug 21 12:20:27 CEST 2009


Author: amateja                      Date: Fri Aug 21 10:20:27 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial

---- Files affected:
packages/perl-SUPER:
   perl-SUPER.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/perl-SUPER/perl-SUPER.spec
diff -u /dev/null packages/perl-SUPER/perl-SUPER.spec:1.1
--- /dev/null	Fri Aug 21 12:20:27 2009
+++ packages/perl-SUPER/perl-SUPER.spec	Fri Aug 21 12:20:21 2009
@@ -0,0 +1,78 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	autodeps	# don't BR packages needed only for resolving deps
+%bcond_without	tests		# do not perform "make test"
+#
+%include	/usr/lib/rpm/macros.perl
+%define	pdir	SUPER
+Summary:	SUPER - control superclass method dispatch
+Summary(pl.UTF-8):	SUPER -
+Name:		perl-SUPER
+Version:	1.16
+Release:	1
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/SUPER/%{pdir}-%{version}.tar.gz
+# Source0-md5:	3a0584598514f471f5df9480e12573c0
+URL:		http://search.cpan.org/dist/SUPER/
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with autodeps} || %{with tests}
+BuildRequires:	perl-Sub-Identify
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+When subclassing a class, you occasionally want to dispatch control to
+the superclass -- at least conditionally and temporarily. The Perl
+syntax for calling your superclass is ugly and unwieldy:
+
+$self->SUPER::method(@_);
+
+especially when compared to its Ruby equivalent:
+
+super;
+
+It's even worse in that the normal Perl redispatch mechanism only
+dispatches to the parent of the class containing the method at compile
+time. That doesn't work very well for mixins and roles.
+
+# %description -l pl.UTF-8 # TODO
+
+%prep
+%setup -q -n %{pdir}-%{version}
+
+%build
+%{__perl} Build.PL \
+	destdir=$RPM_BUILD_ROOT \
+	installdirs=vendor
+./Build
+
+%{?with_tests:./Build test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+./Build install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}//*.pm
+%{perl_vendorlib}/SUPER/
+%{_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/08/21 10:20:21  amateja
+- initial
+
================================================================


More information about the pld-cvs-commit mailing list