Accepting request 1239675 from home:tinita:branches:devel:languages:perl:CPAN-P
New dependency for perl-Perl-Critic-Community OBS-URL: https://build.opensuse.org/request/show/1239675 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Critic-Policy-Plicease-ProhibitArrayAssignAref?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
|
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d8b73230d2b8bf2b80104fc0a758c748b9ff37b08bf81baa73f8d709e20cfebe
|
||||
size 36893
|
35
cpanspec.yml
Normal file
35
cpanspec.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
# - source1
|
||||
# - source2
|
||||
#patches:
|
||||
# foo.patch: -p1
|
||||
# bar.patch:
|
||||
# baz.patch: PATCH-FIX-OPENSUSE
|
||||
#preamble: |-
|
||||
# BuildRequires: gcc-c++
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
# sed on %{name}.files
|
||||
#license: SUSE-NonFree
|
||||
#skip_noarch: 1
|
||||
#custom_build: |-
|
||||
#./Build build flags=%{?_smp_mflags} --myflag
|
||||
#custom_test: |-
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
||||
#skip_doc: regexp_to_skip_for_doc.*
|
||||
#add_doc: files to add to docs
|
||||
#misc: |-
|
||||
#anything else to be added to spec file
|
||||
#follows directly after %files section, so it can contain new blocks or also
|
||||
#changes to %files section
|
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 22 22:32:03 UTC 2025 - Tina Müller <tina.mueller@suse.com>
|
||||
|
||||
- Initial import
|
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# spec file for package perl-Perl-Critic-Policy-Plicease-ProhibitArrayAssignAref
|
||||
#
|
||||
# Copyright (c) 2025 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 Perl-Critic-Policy-Plicease-ProhibitArrayAssignAref
|
||||
Name: perl-Perl-Critic-Policy-Plicease-ProhibitArrayAssignAref
|
||||
Version: 100.0.0
|
||||
Release: 0
|
||||
# 100.00 -> normalize -> 100.0.0
|
||||
%define cpan_version 100.00
|
||||
License: GPL-1.0-or-later
|
||||
Summary: Don't assign an anonymous arrayref to an array
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/%{cpan_name}-%{cpan_version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(Perl::Critic)
|
||||
BuildRequires: perl(Perl::Critic::Policy)
|
||||
BuildRequires: perl(Perl::Critic::Utils)
|
||||
BuildRequires: perl(Test::More) >= 0.98
|
||||
Requires: perl(Perl::Critic::Policy)
|
||||
Requires: perl(Perl::Critic::Utils)
|
||||
Provides: perl(Perl::Critic::Policy::Plicease::ProhibitArrayAssignAref) = %{version}
|
||||
%undefine __perllib_provides
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
This policy is a fork of
|
||||
Perl::Critic::Policy::ValuesAndExpressions::ProhibitArrayAssignAref. It
|
||||
differs from the original by not having a dependency on List::MoreUtils. It
|
||||
is unfortunately still licensed as GPL3.
|
||||
|
||||
It asks you not to assign an anonymous arrayref to an array
|
||||
|
||||
@array = [ 1, 2, 3 ]; # bad
|
||||
|
||||
The idea is that it's rather unclear whether an arrayref is intended, or
|
||||
might have meant to be a list like
|
||||
|
||||
@array = ( 1, 2, 3 );
|
||||
|
||||
This policy is under the "bugs" theme (see Perl::Critic/POLICY THEMES) for
|
||||
the chance '[]' is a mistake, and since even if it's correct it will likely
|
||||
make anyone reading it wonder.
|
||||
|
||||
A single arrayref can still be assigned to an array, but with parens to
|
||||
make it clear,
|
||||
|
||||
@array = ( [1,2,3] ); # ok
|
||||
|
||||
Dereferences or array and hash slices (see perldata/Slices) are recognised
|
||||
as an array target and treated similarly,
|
||||
|
||||
@$ref = [1,2,3]; # bad assign to deref
|
||||
@{$ref} = [1,2,3]; # bad assign to deref
|
||||
@x[1,2,3] = ['a','b','c']; # bad assign to array slice
|
||||
@x{'a','b'} = [1,2]; # bad assign to hash slice
|
||||
|
||||
%prep
|
||||
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%files -f %{name}.files
|
||||
%doc Changes README
|
||||
%license COPYING LICENSE
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user