89 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
			
		
		
	
	
			89 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
#
 | 
						|
# spec file for package perl-Data-Alias
 | 
						|
#
 | 
						|
# Copyright (c) 2024 SUSE LLC
 | 
						|
#
 | 
						|
# 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 https://bugs.opensuse.org/
 | 
						|
#
 | 
						|
 | 
						|
 | 
						|
%define cpan_name Data-Alias
 | 
						|
Name:           perl-Data-Alias
 | 
						|
Version:        1.280.0
 | 
						|
Release:        0
 | 
						|
# 1.28 -> normalize -> 1.280.0
 | 
						|
%define cpan_version 1.28
 | 
						|
License:        Artistic-1.0 OR GPL-1.0-or-later
 | 
						|
Summary:        Comprehensive set of aliasing operations
 | 
						|
URL:            https://metacpan.org/release/%{cpan_name}
 | 
						|
Source0:        https://cpan.metacpan.org/authors/id/X/XM/XMATH/%{cpan_name}-%{cpan_version}.tar.gz
 | 
						|
Source1:        cpanspec.yml
 | 
						|
Source100:      README.md
 | 
						|
BuildRequires:  perl
 | 
						|
BuildRequires:  perl-macros
 | 
						|
BuildRequires:  perl(Test::More) >= 0.88
 | 
						|
Provides:       perl(Data::Alias) = %{version}
 | 
						|
%undefine       __perllib_provides
 | 
						|
%{perl_requires}
 | 
						|
 | 
						|
%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 wherever 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 DETAILS.
 | 
						|
 | 
						|
Perl 5.22 added some support for aliasing to the Perl core. It has a
 | 
						|
different syntax, and a different set of operations, from that supplied by
 | 
						|
this module; see perlref/Assigning to References. The core's aliasing
 | 
						|
facilities are implemented more robustly than this module and are better
 | 
						|
supported. If you can rely on having a sufficiently recent Perl version,
 | 
						|
you should prefer to use the core facility rather than use this module. If
 | 
						|
you are already using this module and are now using a sufficiently recent
 | 
						|
Perl, you should attempt to migrate to the core facility.
 | 
						|
 | 
						|
%prep
 | 
						|
%autosetup  -n %{cpan_name}-%{cpan_version}
 | 
						|
 | 
						|
%build
 | 
						|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 | 
						|
%make_build
 | 
						|
 | 
						|
%check
 | 
						|
make test
 | 
						|
 | 
						|
%install
 | 
						|
%perl_make_install
 | 
						|
%perl_process_packlist
 | 
						|
%perl_gen_filelist
 | 
						|
 | 
						|
%files -f %{name}.files
 | 
						|
%doc Changes README
 | 
						|
 | 
						|
%changelog
 |