initial package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Algorithm-FastPermute?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
Algorithm-FastPermute-0.999.tar.gz
Normal file
3
Algorithm-FastPermute-0.999.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:20b08432ac1aebaa2cf290e92344ae19073da6d87be464952a2a73f9718890f9
|
||||
size 7143
|
6
perl-Algorithm-FastPermute.changes
Normal file
6
perl-Algorithm-FastPermute.changes
Normal file
@@ -0,0 +1,6 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 20 16:45:02 UTC 2015 - coolo@suse.com
|
||||
|
||||
- initial package 0.999
|
||||
* created by cpanspec 1.78.08
|
||||
|
85
perl-Algorithm-FastPermute.spec
Normal file
85
perl-Algorithm-FastPermute.spec
Normal file
@@ -0,0 +1,85 @@
|
||||
#
|
||||
# spec file for package perl-Algorithm-FastPermute
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX 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/
|
||||
#
|
||||
|
||||
|
||||
Name: perl-Algorithm-FastPermute
|
||||
Version: 0.999
|
||||
Release: 0
|
||||
%define cpan_name Algorithm-FastPermute
|
||||
Summary: Rapid generation of permutations
|
||||
License: GPL-1.0+ or Artistic-1.0
|
||||
Group: Development/Libraries/Perl
|
||||
Url: http://search.cpan.org/dist/Algorithm-FastPermute/
|
||||
Source0: http://www.cpan.org/authors/id/R/RO/ROBIN/%{cpan_name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
Algorithm::FastPermute generates all the permutations of an array. You pass
|
||||
a block of code, which will be executed for each permutation. The array
|
||||
will be changed in place, and then changed back again before 'permute'
|
||||
returns. During the execution of the callback, the array is read-only and
|
||||
you'll get an error if you try to change its length. (You _can_ change its
|
||||
elements, but the consequences are liable to confuse you and may change in
|
||||
future versions.)
|
||||
|
||||
You have to pass an array, it can't just be a list. It *does* work with
|
||||
special arrays and tied arrays, though unless you're doing something
|
||||
particularly abstruse you'd be better off copying the elements into a
|
||||
normal array first.
|
||||
|
||||
It's very fast. My tests suggest it's four or five times as fast as
|
||||
Algorithm::Permute's traditional interface. If you're permuting a large
|
||||
list (nine or more elements, say) then you'll appreciate this enormously.
|
||||
If your lists are short then Algorithm::Permute will still finish faster
|
||||
than you can blink, and you may find its interface more convenient.
|
||||
|
||||
In fact, the FastPermute interface (and code) is now also included in
|
||||
Algorithm::Permute, so you may not need both. Enhancements and bug fixes
|
||||
will appear here first, from where (at Edwin Pratomo's discretion) they'll
|
||||
probably make their way into Algorithm::Permute.
|
||||
|
||||
The code is run inside a pseudo block, rather than as a normal subroutine.
|
||||
That means you can't use 'return', and you can't jump out of it using
|
||||
'goto' and so on. Also, 'caller' won't tell you anything helpful from
|
||||
inside the callback. Such is the price of speed.
|
||||
|
||||
The order in which the permutations are generated is not guaranteed, so
|
||||
don't rely on it.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes README
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user