2010-04-29 14:44:44 +00:00
|
|
|
#
|
2011-11-18 11:34:45 +00:00
|
|
|
# spec file for package perl-Perl-Tidy
|
2010-04-29 14:44:44 +00:00
|
|
|
#
|
Accepting request 816296 from devel:languages:perl:autoupdate
- updated to 20200619
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 06 19
- Added support for Switch::Plain syntax, issue git #31.
- Fixed minor problem where trailing 'unless' clauses were not
getting vertically aligned.
- Added a parameter --logical-padding or -lop to allow logical padding
to be turned off. Requested by git #29. This flag is on by default.
The man pages have examples.
- Added a parameter -kpit=n to control spaces inside of parens following
certain keywords, requested in git#26. This flag is off by default.
- Added fix for git#25, improve vertical alignment for long lists with
varying numbers of items per line.
- calls to the module Perl::Tidy can now capture any output produced
by a debug flag or one of the 'tee' flags through the new 'debugfile' and
'teefile' call parameters. These output streams are rarely used but
they are now treated the same as any 'logfile' stream.
- add option --break-at-old-semicolon-breakpoints', -bos, requested
in RT#131644. This flag will keep lines beginning with a semicolon.
- Added --use-unicode-gcstring to control use of Unicode::GCString for
evaluating character widths of encoded data. The default is
not to use this (--nouse-unicode-gcstring). If this flag is set,
perltidy will look for Unicode::GCString and, if found, will use it
to evaluate character display widths. This can improve displayed
vertical alignment for files with wide characters. It is a nice
feature but it is off by default to avoid conflicting formatting
when there are multiple developers. Perltidy installation does not
require Unicode::GCString, so users wanting to use this feature need
set this flag and also to install Unicode::GCString separately.
- Added --character-encoding=guess or -guess to have perltidy guess
if a file (or other input stream) is encoded as -utf8 or some
other single-byte encoding. This is useful when processing a mixture
of file types, such as utf8 and latin-1.
Please Note: The default encoding has been set to be 'guess'
instead of 'none'. This seems like the best default, since
it allows perltidy work properly with both
utf8 files and older latin-1 files. The guess mode uses Encode::Guess,
which is included in standard perl distributions, and only tries to
guess if a file is utf8 or not, never any other encoding. If the guess is
utf8, and if the file successfully decodes as utf8, then it the encoding
is assumed to be utf8. Otherwise, no encoding is assumed.
If you do not want to use this new default guess mode, or have a
problem with it, you can set --character-encoding=none (the previous
default) or --character-encoding=utf8 (if you deal with utf8 files).
- Specific encodings of input files other than utf8 may now be given, for
example --character-encoding=euc-jp.
- Fix for git#22, Preserve function signature on a single line. An
unwanted line break was being introduced when a closing signature paren
followed a closing do brace.
- Fix RT#132059, the -dac parameter was not working and caused an error exit
- When -utf8 is used, any error output is encoded as utf8
- Fix for git#19, adjust line break around an 'xor'
- Fix for git#18, added warning for missing comma before unknown bare word.
OBS-URL: https://build.opensuse.org/request/show/816296
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=50
2020-07-01 11:31:53 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2010-04-29 14:44:44 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-06 16:17:10 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-10-13 23:13:00 +00:00
|
|
|
#
|
|
|
|
|
|
2010-12-19 13:07:54 +00:00
|
|
|
|
2010-10-13 23:13:00 +00:00
|
|
|
Name: perl-Perl-Tidy
|
2020-12-11 09:16:55 +00:00
|
|
|
Version: 20201207
|
2013-07-27 12:44:22 +00:00
|
|
|
Release: 0
|
2019-06-02 11:08:23 +00:00
|
|
|
#Upstream: GPL-1.0-or-later
|
2010-10-13 23:13:00 +00:00
|
|
|
%define cpan_name Perl-Tidy
|
|
|
|
|
Summary: Parses and beautifies perl source
|
2018-02-19 07:21:38 +00:00
|
|
|
License: GPL-2.0-or-later
|
2010-10-13 23:13:00 +00:00
|
|
|
Group: Development/Libraries/Perl
|
Accepting request 816296 from devel:languages:perl:autoupdate
- updated to 20200619
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 06 19
- Added support for Switch::Plain syntax, issue git #31.
- Fixed minor problem where trailing 'unless' clauses were not
getting vertically aligned.
- Added a parameter --logical-padding or -lop to allow logical padding
to be turned off. Requested by git #29. This flag is on by default.
The man pages have examples.
- Added a parameter -kpit=n to control spaces inside of parens following
certain keywords, requested in git#26. This flag is off by default.
- Added fix for git#25, improve vertical alignment for long lists with
varying numbers of items per line.
- calls to the module Perl::Tidy can now capture any output produced
by a debug flag or one of the 'tee' flags through the new 'debugfile' and
'teefile' call parameters. These output streams are rarely used but
they are now treated the same as any 'logfile' stream.
- add option --break-at-old-semicolon-breakpoints', -bos, requested
in RT#131644. This flag will keep lines beginning with a semicolon.
- Added --use-unicode-gcstring to control use of Unicode::GCString for
evaluating character widths of encoded data. The default is
not to use this (--nouse-unicode-gcstring). If this flag is set,
perltidy will look for Unicode::GCString and, if found, will use it
to evaluate character display widths. This can improve displayed
vertical alignment for files with wide characters. It is a nice
feature but it is off by default to avoid conflicting formatting
when there are multiple developers. Perltidy installation does not
require Unicode::GCString, so users wanting to use this feature need
set this flag and also to install Unicode::GCString separately.
- Added --character-encoding=guess or -guess to have perltidy guess
if a file (or other input stream) is encoded as -utf8 or some
other single-byte encoding. This is useful when processing a mixture
of file types, such as utf8 and latin-1.
Please Note: The default encoding has been set to be 'guess'
instead of 'none'. This seems like the best default, since
it allows perltidy work properly with both
utf8 files and older latin-1 files. The guess mode uses Encode::Guess,
which is included in standard perl distributions, and only tries to
guess if a file is utf8 or not, never any other encoding. If the guess is
utf8, and if the file successfully decodes as utf8, then it the encoding
is assumed to be utf8. Otherwise, no encoding is assumed.
If you do not want to use this new default guess mode, or have a
problem with it, you can set --character-encoding=none (the previous
default) or --character-encoding=utf8 (if you deal with utf8 files).
- Specific encodings of input files other than utf8 may now be given, for
example --character-encoding=euc-jp.
- Fix for git#22, Preserve function signature on a single line. An
unwanted line break was being introduced when a closing signature paren
followed a closing do brace.
- Fix RT#132059, the -dac parameter was not working and caused an error exit
- When -utf8 is used, any error output is encoded as utf8
- Fix for git#19, adjust line break around an 'xor'
- Fix for git#18, added warning for missing comma before unknown bare word.
OBS-URL: https://build.opensuse.org/request/show/816296
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=50
2020-07-01 11:31:53 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2017-05-25 14:59:16 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/%{cpan_name}-%{version}.tar.gz
|
2015-08-23 14:13:26 +00:00
|
|
|
Source1: cpanspec.yml
|
2010-10-13 23:13:00 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildRequires: perl
|
|
|
|
|
BuildRequires: perl-macros
|
2013-07-27 12:44:22 +00:00
|
|
|
%{perl_requires}
|
2010-04-29 14:44:44 +00:00
|
|
|
|
|
|
|
|
%description
|
2010-10-13 23:13:00 +00:00
|
|
|
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.
|
2010-04-29 14:44:44 +00:00
|
|
|
|
2013-07-27 12:44:22 +00:00
|
|
|
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
|
2016-03-09 06:33:32 +00:00
|
|
|
completion. Additional discuss of errors is contained below in the ERROR
|
|
|
|
|
HANDLING section.
|
2013-07-27 12:44:22 +00:00
|
|
|
|
2010-04-29 14:44:44 +00:00
|
|
|
%prep
|
2010-10-13 23:13:00 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
Accepting request 753928 from devel:languages:perl:autoupdate
- updated to 20191203
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2019 12 03
- Fixed issue RT#131115: -bli option not working correctly.
Closing braces were not indented in some cases due to a glitch
introduced in version 20181120.
- Fixed issue RT#130394: Allow short nested blocks. Given the following
$factorial = sub { reduce { $a * $b } 1 .. 11 };
Previous versions would always break the sub block because it
contains another block (the reduce block). The fix keeps
short one-line blocks such as this intact.
- Implement issue RT#130640: Allow different subroutine keywords.
Added a flag --sub-alias-list=s or -sal=s, where s is a string with
one or more aliases for 'sub', separated by spaces or commas.
For example,
perltidy -sal='method fun'
will cause the perltidy to treat the words 'method' and 'fun' to be
treated the same as if they were 'sub'.
- Added flag --space-prototype-paren=i, or -spp=i, to control spacing
before the opening paren of a prototype, where i=0, 1, or 2:
i=0 no space
i=1 follow input [current and default]
i=2 always space
Previously, perltidy always followed the input.
For example, given the following input
sub usage();
The result will be:
sub usage(); # i=0 [no space]
sub usage(); # i=1 [default; follows input]
sub usage (); # i=2 [space]
- Fixed issue git#16, minor vertical alignment issue.
- Fixed issue git#10, minor conflict of -wn and -ce
- Improved some vertical alignments involving two lines.
OBS-URL: https://build.opensuse.org/request/show/753928
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=46
2019-12-04 14:04:47 +00:00
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2010-04-29 14:44:44 +00:00
|
|
|
|
|
|
|
|
%build
|
2018-12-06 16:17:10 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
|
make %{?_smp_mflags}
|
2010-04-29 14:44:44 +00:00
|
|
|
|
|
|
|
|
%check
|
2018-12-06 16:17:10 +00:00
|
|
|
make test
|
2010-04-29 14:44:44 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%perl_make_install
|
2013-07-27 12:44:22 +00:00
|
|
|
%perl_process_packlist
|
2010-04-29 14:44:44 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2013-07-27 12:44:22 +00:00
|
|
|
%defattr(-,root,root,755)
|
2020-08-24 16:02:50 +00:00
|
|
|
%doc BUGS.md CHANGES.md docs examples pm2pl README.md
|
2017-05-25 14:59:16 +00:00
|
|
|
%license COPYING
|
2010-04-29 14:44:44 +00:00
|
|
|
|
|
|
|
|
%changelog
|