packages: perl-Test-Refcount/perl-Test-Refcount.spec (NEW) - initial

amateja amateja at
Tue Oct 27 20:48:47 CET 2009

Author: amateja                      Date: Tue Oct 27 19:48:47 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial

---- Files affected:
   perl-Test-Refcount.spec (NONE -> 1.1)  (NEW)

---- Diffs:

Index: packages/perl-Test-Refcount/perl-Test-Refcount.spec
diff -u /dev/null packages/perl-Test-Refcount/perl-Test-Refcount.spec:1.1
--- /dev/null	Tue Oct 27 20:48:47 2009
+++ packages/perl-Test-Refcount/perl-Test-Refcount.spec	Tue Oct 27 20:48:41 2009
@@ -0,0 +1,82 @@
+# $Revision$, $Date$
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+%include	/usr/lib/rpm/macros.perl
+%define	pdir	Test
+%define	pnam	Refcount
+Summary:	Test::Refcount - assert reference counts on objects
+Name:		perl-Test-Refcount
+Version:	0.05
+Release:	1
+# same as perl
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+# Source0-md5:	657b089713b1283218590119faf12432
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires:	perl(Devel::FindRef)
+BuildRequires:	perl-Devel-Refcount
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+The Perl garbage collector uses simple reference counting during the
+normal execution of a program. This means that cycles or unweakened
+references in other parts of code can keep an object around for longer
+than intended. To help avoid this problem, the reference count of a
+new object from its class constructor ought to be 1. This way, the
+caller can know the object will be properly DESTROYed when it drops
+all of its references to it.
+This module provides two test functions to help ensure this property
+holds for an object class, so as to be polite to its callers.
+If the assertion fails; that is, if the actual reference count is
+different to what was expected, a trace of references to the object is
+printed, using Marc Lehmann's Devel::FindRef module. See the examples
+below for more information.
+# %description -l pl.UTF-8
+%setup -q -n %{pdir}-%{pnam}-%{version}
+%{__perl} Build.PL \
+	destdir=$RPM_BUILD_ROOT \
+	installdirs=vendor
+%{?with_tests:./Build test}
+./Build install
+%doc Changes README
+%define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+* %{date} PLD Team <feedback at>
+All persons listed below can be reached at <cvs_login>
+Revision 1.1  2009/10/27 19:48:41  amateja
+- initial

More information about the pld-cvs-commit mailing list