# # spec file for package perl-Data-Alias (Version 1.10) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: perl-Data-Alias %define cpan_name Data-Alias Summary: Comprehensive set of aliasing operations Version: 1.10 Release: 1 License: GPL+ or Artistic Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Data-Alias/ #Source: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Data-Alias-1.10.tar.gz Source: %{cpan_name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} BuildRequires: perl >= 5.8.9 BuildRequires: perl-macros %description Aliasing is the phenomenon where two different expressions actually refer to the same thing. Modifying one will modify the other, and if you take a reference to both, the two values are the same. Aliasing occurs in Perl for example in for-loops and sub-calls: for $var ($x) { # here $var is an alias to $x } foo($y); sub foo { # here $_[0] is an alias to $y } Data::Alias is a module that allows you to apply "aliasing semantics" to a section of code, causing aliases to be made whereever Perl would normally make copies instead. You can use this to improve efficiency and readability, when compared to using references. The exact details of aliasing semantics are below under the /DETAILS manpage. Authors: -------- Matthijs van Duin developed the module originally, and maintained it until 2007. Andrew Main (Zefram) updated it to work with Perl versions 5.11.0 and later. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install ### since 11.4 perl_process_packlist ### removes .packlist, perllocal.pod files %if 0%{?suse_version} > 1130 %perl_process_packlist %else # do not perl_process_packlist # remove .packlist file %{__rm} -f $RPM_BUILD_ROOT%perl_vendorarch/auto/Data/Alias/.packlist # remove perllocal.pod file %{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod %endif %perl_gen_filelist %clean %{__rm} -rf $RPM_BUILD_ROOT %files -f %{name}.files %defattr(-,root,root,-) %doc Changes README %changelog