forked from pool/perl-Perl-Tidy
- updated to 20250616.0.0 (20250616)
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2025 06 16
- Added support for the assigning logical xor ^^= operator
- For input parameters which allow a paren type to be selected, the
selection 'f' (function call) now includes functions called with
a direct arrow before the paren, '->('. This was an oversight which
has been corrected.
- A new parameter --break-at-old-comma-types=s, or -boct=s, allows the
parameter --break-at-old-comma-breakpoints (-boc) to be limited to
selected container types. For example, -boc -boct='f(' means break
at old commas but only if they are function call lists.
- A new parameter --cuddled-paren-brace-weld, or -cpbw, has been added to
handle issue git #184. This modifies --cuddled-paren-brace by
preventing a paren and following brace from getting separated in
certain situations. The difference is illustrated here:
# perltidy -cpb alone has no effect for this short snippet:
if ( $Kouter_opening == $Kfirst
&& $has_tight_paren{$type_prev} )
{
$Kref = $Kprev;
}
# perltidy -cpb -cpbw keeps the closing paren next to the opening brace:
if (
$Kouter_opening == $Kfirst
&& $has_tight_paren{$type_prev}
) {
$Kref = $Kprev;
}
- The parameter --maximum-fields-per-table, or -mft, now accepts a string
input which can limit its application to certain containers. For
example, -mft='f(1' means that function call lists should be formatted
with just 1 item per line. It has no effect on other tables. The
manual has further information.
- Add option --break-open-compact-parens=s, discussed in git #78.
This changes the default formatting for lists which would normally
be displayed compactly on two lines. It causes them to be formatted
in the same way as long lists, with line breaks at the opening and
closing parentheses.
- Add option --skip-formatting-except-id=NAME, or -sfei=NAME, discussed
in git #183. This allows formatting to apply only to lines tagged
with #<<< id=NAME, where NAME is a user-defined tag. The special
variation -sfei='-' can be used to run perltidy with full checking
but without any formatting changes.
- A relatively rare problem with the formatting combination -xci and -lp or
-xlp has been fixed. Some lines had more leading spaces that intended.
- New option -m added to --dump-mismatched-returns and
--warn-mismatched-returns. This checks for multiple array
return sizes. A warning occurs when a sub has multiple returns
of finite lists with different counts greater than 1, and
not all of them are matched with calls.
- Improved support for Object::Pad, see git #182.
- A limitation on the treatment of lexical subs has been fixed. Previously,
a lexical sub with the same name as a quote operator would produce a warning,
and might cause a tokenization error.
- Here targets in quotes are now located and handled correctly.
OBS-URL: https://build.opensuse.org/request/show/1288028
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=96
89 lines
3.1 KiB
RPMSpec
89 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package perl-Perl-Tidy
|
|
#
|
|
# 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-Tidy
|
|
Name: perl-Perl-Tidy
|
|
Version: 20250616.0.0
|
|
Release: 0
|
|
# 20250616 -> normalize -> 20250616.0.0
|
|
%define cpan_version 20250616
|
|
#Upstream: GPL-1.0-or-later
|
|
License: GPL-2.0-or-later
|
|
Summary: Indent and reformat perl scripts
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
Provides: perl(Perl::Tidy) = %{version}
|
|
Provides: perl(Perl::Tidy::Debugger) = %{version}
|
|
Provides: perl(Perl::Tidy::Diagnostics) = %{version}
|
|
Provides: perl(Perl::Tidy::FileWriter) = %{version}
|
|
Provides: perl(Perl::Tidy::Formatter) = %{version}
|
|
Provides: perl(Perl::Tidy::HtmlWriter) = %{version}
|
|
Provides: perl(Perl::Tidy::IOScalar) = %{version}
|
|
Provides: perl(Perl::Tidy::IOScalarArray) = %{version}
|
|
Provides: perl(Perl::Tidy::IndentationItem) = %{version}
|
|
Provides: perl(Perl::Tidy::Logger) = %{version}
|
|
Provides: perl(Perl::Tidy::Tokenizer) = %{version}
|
|
Provides: perl(Perl::Tidy::VerticalAligner) = %{version}
|
|
Provides: perl(Perl::Tidy::VerticalAligner::Alignment) = %{version}
|
|
Provides: perl(Perl::Tidy::VerticalAligner::Line) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module makes the functionality of the perltidy utility available to
|
|
perl scripts. Any or all of the input parameters may be omitted, in which
|
|
case the @ARGV array will be used to provide input parameters as described
|
|
in the perltidy(1) man page.
|
|
|
|
For example, the perltidy script is basically just this:
|
|
|
|
use Perl::Tidy;
|
|
Perl::Tidy::perltidy();
|
|
|
|
The call to *perltidy* returns a scalar *$error_flag* which is TRUE if an
|
|
error caused premature termination, and FALSE if the process ran to normal
|
|
completion. Additional discuss of errors is contained below in the ERROR
|
|
HANDLING section.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
|
|
|
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 BUGS.md CHANGES.md docs examples pm2pl README.md
|
|
%license COPYING
|
|
|
|
%changelog
|