SPECS: perl-Class-Member.spec (NEW) - initial revision

baggins baggins at pld-linux.org
Sat Nov 29 18:38:42 CET 2008


Author: baggins                      Date: Sat Nov 29 17:38:42 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
SPECS:
   perl-Class-Member.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/perl-Class-Member.spec
diff -u /dev/null SPECS/perl-Class-Member.spec:1.1
--- /dev/null	Sat Nov 29 18:38:42 2008
+++ SPECS/perl-Class-Member.spec	Sat Nov 29 18:38:36 2008
@@ -0,0 +1,80 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%include	/usr/lib/rpm/macros.perl
+%define	pdir	Class
+%define	pnam	Member
+Summary:	Class::Member - A set of modules to make the module developement easier
+#Summary(pl.UTF-8):	
+Name:		perl-Class-Member
+Version:	1.6
+Release:	1
+# same as perl
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://search.cpan.org/CPAN/authors/id/O/OP/OPI/Class-Member-1.6.tar.gz
+# Source0-md5:	43819bd7853c6c251e4bdf2bf1e81831
+URL:		http://search.cpan.org/~opi/Class-Member/
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Perl class instances are mostly blessed HASHes or GLOBs and store member
+variables either as $self->{membername} or
+${*$self}{membername} respectively.
+
+This is very error prone when you start to develope derived classes based
+on such modules. The developer of the derived class must watch the
+member variables of the base class to avoid name conflicts.
+
+To avoid that Class::Member::XXX stores member variables in its own
+namespace prepending the package name to the variable name, e.g.
+
+ package My::New::Module;
+
+ use Class::Member::HASH qw/member_A memberB/;
+
+will store member_A as $self->{'My::New::Module::member_A'}.
+
+# %description -l pl.UTF-8
+# TODO
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make}
+
+%{?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_vendorlib}/Class/*.pm
+%{perl_vendorlib}/Class/Member
+%{_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  2008/11/29 17:38:36  baggins
+- initial revision
+
================================================================


More information about the pld-cvs-commit mailing list