# # spec file for package perl-sanity # # 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 sanity Name: perl-sanity Version: 1.30.0 Release: 0 # 1.03 -> normalize -> 1.30.0 %define cpan_version 1.03 License: Artistic-2.0 Summary: The ONLY meta pragma you'll ever need! URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/B/BB/BBYRD/%{cpan_name}-%{cpan_version}.tar.gz Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Import::Into) >= 1.1.0 BuildRequires: perl(List::MoreUtils) >= 0.23 BuildRequires: perl(Test::CheckDeps) >= 0.010 BuildRequires: perl(Test::More) >= 0.94 Requires: perl(Import::Into) >= 1.1.0 Requires: perl(List::MoreUtils) >= 0.23 Provides: perl(sanity) = %{version} %undefine __perllib_provides Recommends: perl(Toolkit) Recommends: perl(autolocale) Recommends: perl(autovivification) Recommends: perl(bareword::filehandles) Recommends: perl(criticism) Recommends: perl(indirect) Recommends: perl(multidimensional) Recommends: perl(namespace::autoclean) Recommends: perl(namespace::clean) Recommends: perl(namespace::functions) Recommends: perl(namespace::sweep) Recommends: perl(subs::auto) Recommends: perl(true) Recommends: perl(utf8::all) Recommends: perl(vendorlib) %{perl_requires} %description Modern::Perl? common::sense? no nonsense? use latest? Everybody has their own opinion on what pragmas and modules are "required" for every person to use. These opinions turn into "personal pragmas", so that people don't have to type several 'use' lines of header in front of every module they write. Personal opinions and pragmas don't really belong in the CPAN namespace. (It's CPAN, not Personal PAN. If you want a Personal PAN, go call Pizza Hut.) But copying code on potentially hundreds of modules doesn't make sense, either. That was my mentality when I had a personal opinion of my own. Why repeat the same problem like everybody else? This "sanity" module attempts to level the playing field by making it a *customizable* personal pragma, allowing you to both reduce the code needed and still implement all of the modules/pragmas you need. As an illustration to what it's capable of, this pragma will emulate all of the other personal pragmas, most of them 100% working exactly how they do it. %prep %autosetup -n %{cpan_name}-%{cpan_version} find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %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 README.html %license LICENSE %changelog