2010-11-24 16:58:31 +00:00
|
|
|
#
|
2014-02-20 09:33:18 +00:00
|
|
|
# spec file for package perl-Data-Alias
|
2010-11-24 16:58:31 +00:00
|
|
|
#
|
2014-11-23 11:40:37 +00:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-11-24 16:58:31 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2014-02-20 09:33:18 +00:00
|
|
|
|
2010-07-24 22:22:14 +00:00
|
|
|
Name: perl-Data-Alias
|
2014-11-23 11:40:37 +00:00
|
|
|
Version: 1.18
|
|
|
|
Release: 0
|
2011-04-04 09:29:49 +00:00
|
|
|
%define cpan_name Data-Alias
|
|
|
|
Summary: Comprehensive set of aliasing operations
|
2014-11-23 11:40:37 +00:00
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2011-04-04 09:29:49 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2014-11-23 11:40:37 +00:00
|
|
|
Url: http://search.cpan.org/dist/Data-Alias/
|
2011-04-26 18:13:33 +00:00
|
|
|
Source: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/%{cpan_name}-%{version}.tar.gz
|
2010-11-24 16:58:31 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-04-04 09:29:49 +00:00
|
|
|
BuildRequires: perl
|
2010-11-24 16:58:31 +00:00
|
|
|
BuildRequires: perl-macros
|
2011-04-04 09:29:49 +00:00
|
|
|
%{perl_requires}
|
2010-07-24 23:23:59 +00:00
|
|
|
|
2010-07-24 22:22:14 +00:00
|
|
|
%description
|
2010-11-24 16:58:31 +00:00
|
|
|
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
|
2010-07-24 22:22:14 +00:00
|
|
|
reference to both, the two values are the same.
|
|
|
|
|
2010-11-24 16:58:31 +00:00
|
|
|
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
|
2014-11-23 11:40:37 +00:00
|
|
|
section of code, causing aliases to be made wherever Perl would normally
|
2010-11-24 16:58:31 +00:00
|
|
|
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.
|
|
|
|
|
2010-07-24 22:22:14 +00:00
|
|
|
%prep
|
2010-11-24 16:58:31 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2010-07-24 22:22:14 +00:00
|
|
|
|
|
|
|
%build
|
2011-04-04 09:29:49 +00:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
2010-11-24 16:58:31 +00:00
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
2010-07-24 22:22:14 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
2010-11-24 16:58:31 +00:00
|
|
|
%perl_gen_filelist
|
2010-07-24 22:22:14 +00:00
|
|
|
|
2010-11-24 16:58:31 +00:00
|
|
|
%files -f %{name}.files
|
2011-04-26 18:13:33 +00:00
|
|
|
%defattr(-,root,root,755)
|
2010-07-24 22:22:14 +00:00
|
|
|
%doc Changes README
|
|
|
|
|
2010-11-24 16:58:31 +00:00
|
|
|
%changelog
|