- New upstream release 1.118: Policy Changes: - CodeLayout::RequireTidyCode: revise to work with incompatible changes in Perl::Tidy 20120619 (CPAN RT#77977) - TestingAndDebugging::ProhibitNoWarnings: correct the parse of the 'no warnings' statement, so that 'no warnings "qw"' is recognized as suppressing just 'qw' warnings (CPAN RT#74647) - Miscellanea::RequireRcsKeywords has been moved to the Perl-Critic-More distribution (CPAN RT#69546) Other Changes: - Make all unescaped literal "{" characters in regexps into character classes; these are deprecated, and became noisy with Perl 5.17.0 (CPAN RT#77510) - Drop now-redundant patch for Perl::Tidy compatibility - BR: perl(lib) for the build process - BR: perl(base), perl(PPIx::Utilities::Node) and perl(Test::Builder) ≥ 0.92 for the module (Test::Builder required by Test::Perl::Critic::Policy) - BR: perl(Exporter) ≥ 5.58; with older versions we get: ":color_severity" is not exported by the Perl::Critic::Utils::Constants module - BR: perl(File::Spec::Functions) for the test suite - Drop buildreqs for perl(charnames), perl(File::Basename), perl(File::Find), perl(overload), perl(strict) and perl(warnings) - not dual livedepel9
parent
f1446a8f8b
commit
b65d650da0
@ -1,41 +0,0 @@
|
|||||||
See https://rt.cpan.org/Public/Bug/Display.html?id=77977
|
|
||||||
|
|
||||||
--- lib/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm (revision 4123)
|
|
||||||
+++ lib/Perl/Critic/Policy/CodeLayout/RequireTidyCode.pm (working copy)
|
|
||||||
@@ -12,6 +12,7 @@
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
use English qw(-no_match_vars);
|
|
||||||
+use IO::String qw< >;
|
|
||||||
use Readonly;
|
|
||||||
|
|
||||||
use Perl::Tidy qw< >;
|
|
||||||
@@ -49,7 +50,8 @@
|
|
||||||
|
|
||||||
# Set configuration if defined
|
|
||||||
if (defined $self->{_perltidyrc} && $self->{_perltidyrc} eq $EMPTY) {
|
|
||||||
- $self->{_perltidyrc} = \$EMPTY;
|
|
||||||
+ my $rc = $EMPTY;
|
|
||||||
+ $self->{_perltidyrc} = \$rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $TRUE;
|
|
||||||
@@ -92,10 +94,16 @@
|
|
||||||
|
|
||||||
# Trap Perl::Tidy errors, just in case it dies
|
|
||||||
my $eval_worked = eval {
|
|
||||||
+ # Perl::Tidy 20120619 no longer accepts a scalar reference for stdio.
|
|
||||||
+ my $handle = IO::String->new( $stderr );
|
|
||||||
+ # Since Perl::Tidy 20120619 modifies $source, we make a copy so
|
|
||||||
+ # we can get a good comparison. Doing an s/// on $source after the
|
|
||||||
+ # fact appears not to work with the previous Perl::Tidy.
|
|
||||||
+ my $source_copy = $source;
|
|
||||||
Perl::Tidy::perltidy(
|
|
||||||
- source => \$source,
|
|
||||||
+ source => \$source_copy,
|
|
||||||
destination => \$dest,
|
|
||||||
- stderr => \$stderr,
|
|
||||||
+ stderr => $handle,
|
|
||||||
defined $self->{_perltidyrc} ? (perltidyrc => $self->{_perltidyrc}) : (),
|
|
||||||
);
|
|
||||||
1;
|
|
Loading…
Reference in new issue